Run E2E tests on GitHub Actions #9
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 | |
# Sets up a specific version of Node.js for use in the workflow | |
- name: Install NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
# Installs your project dependencies using npm ci | |
- name: Install dependencies | |
run: npm ci | |
# Builds your application using your package.json's build script | |
- name: Build app | |
run: npm run build | |
# Run E2E tests | |
- 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 |