This is primarily opinion based. Because your question asks that.
I've heard that going to graveyards and performing worship in front of the deads is forbidden.
You might have heard this from those who're not Sufis.
is called "grave worship"
What you heard is true, but in fact is it? Primarily opinion based. Depends upon how you interpret Islam.
What is grave worship?
This is a broad term used by Non Sufis, to describe the people who think that dead people can listen to them.
You need not, go to the graves even, you can directly invoke those dead people hoping they can listen to you. But, there are Hadith which they might use, actual visiting graves is better so that they can listen better.
what actions and situations are considered so?
By asking if it is forbidden, I think you mean to ask if it is Shirk or not, because Non Sufis simply use the polite term "forbidden".
Non Sufis use this list to describe how it is shirk. But, Sufis tell, "Hey in that list, all those verses are referring to deities besides Allah, but we don't consider those dead people deities, but just simply ask them". The "ask them" is considered as "invoking them" by Non Sufis.
what are the consequences of that? (I heard it makes one mushrik)
Primarily opinion based.
non Sufis obviously if call that action as Shirk then one who performs it is called "Mushrik". And vice versa.
And Consequences of Shirk, I think you know it.
Revisiting your question.
going to graveyards is forbidden
From here I just provide my thoughts over this.
Going to graveyards is not sin, but going to graveyards with an intention that you'll get extra something from there is a Shirk. Because going to hajj, going to Masjid is different from going to graveyards. These are commanded do be done. But visiting graveyards every now and then to show up is not commanded.
and performing worship in front of the deads
Don't get in what way are you asking, a pic could've been better. But, anywhere you go, worshiping Allah maintaining something as "Sutrah" wouldn't make it a problem. But, they don't say you worship a person as you do to Allah. So, they say "asking from the dead as though they're listening to you". Again as I said above, is opinion based unless you specify a view.
A Sufi view would be yes, it is permissible, and a Non Sufi view would be a somewhat closer to this question "Permissible to talk to someone in my mind who has died?", i.e if the dead cannot hear, then asking them would make no use, Unless if the dead is a martyr (Even if he is, there goes another discussion for it). Just comment below if you've changed your mind and want a view specific answer.
May the creator guide us all.