Invoke command that doesn't hang the step, and monitors if it failed


Consider the following job step:

      - name: call Appium
        run: |
          appium 2>&1 &

I noticed that if the command Appium fails, the step doesn’t fail. However, if I remove the “2>&1 &” part, the step fails when the command fails. Is there a way to change this? I’d like to keep the command “seamless” and monitor it somehow