Run Behat tests on env

I’m trying to get a behat test to work, so we use the pr env for our behat tests.

I am able to SSH into the env but as soon as I run the command vendor/bin/behat it tries to run it in the GitHub container not the env.

This is the code:

name: Behat tests

on: push
  PR_NUMBER: ${{ github.event.number }}

    name: Setup and run the behat tests
    runs-on: ubuntu-latest
      - uses: actions/checkout@v2
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
          php-version: '7.4'
      - name: Download Platform CLI
        run: curl -fsS | php
      - name: Add .ssh folder
        run: |
          mkdir ~/.ssh
      - name: Add Psh to trusted keys
        run: |
          ssh-keyscan '' >> ~/.ssh/known_hosts
          ssh-keyscan '' >> ~/.ssh/known_hosts
      - name: Test CLI
        run: |
          ~/.platformsh/bin/platform ssh --project=PROJECTID --environment=pr-13

What you put into a run step is a script that will run on the runner. If you want to run something on a remote host using SSH you need to provide those commands to the SSH command. With regular SSH that looks something like this:

ssh "run-this --option"

I’m not familiar with the platform command you’re using, so I can’t say how to do it there.