Feat/deploy #12
Workflow file for this run
This file contains 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: Test the application | |
on: [pull_request] | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Deploy | |
run: | | |
echo "${{ secrets.EC2_SSH_KEY }}" > ssh_key | |
chmod 600 ssh_key | |
ssh -oStrictHostKeyChecking=no -i ssh_key [email protected] "cd /home/ubuntu/pong && git pull && make prod" | |
- name: Run backend unit tests | |
run: docker compose run backend sh -c "yarn test" | |
- name: Run backend e2e tests | |
run: docker compose run backend sh -c "yarn test:e2e" |