Movement requires you to expend speed or act
The Movement and Position rules explain it this way (p. 190 PHB):
On your turn,you can move a distance up to your speed. You can use as much or as little of your speed as you like on your turn, following the rules here.
Your movement can include jumping, climbing, and swimming. These different modes of movement can be combined with walking, or they can constitute your entire move. However you’re moving, you deduct the distance of each part of your move from your speed until it is used up or until you are done moving.
So the defining criterium for your movement generally is that you are spending speed. If some effect compels you to spend your speed (say, a command spell), you are moving. If some effect changes your position without you spending speed (or taking actions or reactions to move, see below) you are not moving, you are being moved.
So for your One with Shadows invisible warlock, being commanded to move would turn you visible, being shoved or pulled by a thorn whip or blasted with a thunderwave would not make you visible.
This interpretation is also supported by a wordy Sage Advice Compendium entry:
Does Polearm Master let me make an opportunity attack against a target that is being forced to approach me?
A creature doesn’t provoke an opportunity attack if it is moved without the use of its movement, its action, or its reaction. For example, the effect of the antipathy/sympathy spell requires the target to use its movement, meaning that it would provoke opportunity attacks when it does so. Similarly, dissonant whispers requires the target to move using its reaction (if available), so that activity also provokes opportunity attacks. In contrast, a creature that’s pushed by a gust of wind spell does not provoke opportunity attacks.
This explains the "generally" rider above: some actions, bonus actions or reactions allow you to move without spending speed, like for example a barbarians Instinctive Pounce or casting misty step. They require an action or bonus action from you, so you are actively moving, you are not being moved, and so they would end your Invisibility.
This caveat also resolves the contradiction one would otherwise face if movement was defined only by paying speed, because the PHB says on p. 191:
To move while prone, you must crawl or use magic such as teleportation.
So you move when you use teleportation to change your location, even though this does not expend your movement, in contradiction to the first quote above. (Note that you would not be susceptible to an opportunity attack here, as those don't work on teleportation). You don't move, if someone else teleports you — again, you are being moved in that case.