refactor(#766): use zod for request validation in create/update game #1177
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: Cypress Tests | |
on: push | |
jobs: | |
cypress-run: | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
steps: | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Print Versions | |
run: | | |
node --version | |
npm --version | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Copied from https://nextjs.org/docs/pages/building-your-application/deploying/ci-build-caching#github-actions | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
${{ github.workspace }}/frontend/.next/cache | |
# Generate a new cache whenever packages or source files change. | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
# If source files changed but packages didn't, rebuild from a prior cache. | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | |
- name: Install Frontend Dependencies | |
working-directory: frontend | |
run: npm ci | |
- name: Build Frontend | |
working-directory: frontend | |
run: npm run build:test | |
- name: Cypress Run | |
uses: cypress-io/github-action@v6 | |
with: | |
working-directory: frontend | |
build: npx cypress info | |
start: npm run start:build | |
wait-on: 'http://localhost:3000' | |
wait-on-timeout: 300 | |
record: false | |
command: npm run cy:parallel | |
env: | |
AWS_COGNITO_USERNAME: ${{ secrets.AWS_COGNITO_USERNAME }} | |
AWS_COGNITO_PASSWORD: ${{ secrets.AWS_COGNITO_PASSWORD }} | |
- name: Save Cypress Screenshots | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: screenshots | |
path: frontend/cypress/screenshots | |
# - name: Check Coverage | |
# working-directory: frontend | |
# run: npx nyc report --reporter=text-summary >> $GITHUB_STEP_SUMMARY | |
# - name: Upload Coverage Report | |
# uses: actions/upload-artifact@v4 | |
# if: always() | |
# with: | |
# name: coverage | |
# path: frontend/coverage |