Catalyst e2e Stack - Pytest #73
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Catalyst e2e Stack - Pytest" | |
| on: | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Catalyst Node - Docker build and push"] | |
| types: [completed] | |
| branches: | |
| - "**" | |
| concurrency: | |
| group: catalyst-e2e-pytest | |
| cancel-in-progress: false | |
| env: | |
| TARGET_MACHINE_IP: 178.79.157.173 | |
| jobs: | |
| build: | |
| name: Set and run pytest | |
| runs-on: ubuntu-latest | |
| if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - name: Setup SSH Key | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan -H ${{ env.TARGET_MACHINE_IP }} >> ~/.ssh/known_hosts | |
| - name: SSH into target machine | |
| run: | | |
| ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=60 -o ServerAliveCountMax=30 root@${{ env.TARGET_MACHINE_IP }} << 'EOF' | |
| cd ~/e2e_catalyst_tests/simple_taiko_node | |
| git pull | |
| cp .env.example .env | |
| docker compose stop catalyst-node-1 | |
| docker compose stop catalyst-node-2 | |
| docker compose up -d | |
| cd ~/e2e_catalyst_tests/catalyst/e2e_tests | |
| git pull | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| pip install -r requirements.txt | |
| cp .env.example .env | |
| sleep 30 # wait for nodes to warm up | |
| pytest -s -v | |
| EOF | |
| - name: Summary | |
| run: | | |
| echo "## Pytest completed :green_circle:" >> $GITHUB_STEP_SUMMARY |