Run E2E tests on GitHub Actions #14
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: Client build and deploy | |
# on: | |
# push: | |
# branches: | |
# - main | |
# paths: | |
# - "client/**" | |
name: Run e2e tests | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Build & Deploy | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: client | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v3 | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Install client dependencies | |
run: npm ci | |
- name: Install server dependencies | |
run: npm ci | |
working-directory: server | |
- name: Build app | |
run: npm run build | |
- name: Install Playwright browsers | |
run: npx playwright install | |
working-directory: server | |
- name: Run E2E tests | |
run: npx playwright test | |
working-directory: server | |
# Deploys your application to AWS S3 | |
# - name: Deploy | |
# run: | | |
# cd build | |
# aws s3 sync . s3://perntodo | |
# env: | |
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# AWS_DEFAULT_REGION: us-east-1 |