test #1 #6421
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: Client Tests | |
on: | |
push: | |
paths: | |
- 'client/**' | |
- '.github/workflows/testing-client.yml' | |
jobs: | |
testing-client: | |
name: Running client tests | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
if: ${{ github.ref_name != 'test' }} | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Node setup | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
- uses: pnpm/action-setup@v4 | |
- name: Install Client dependencies | |
run: pnpm client:deps | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 | |
with: | |
record: true | |
working-directory: client | |
install: false | |
build: pnpm build | |
start: pnpm start | |
browser: chrome | |
wait-on: http://localhost:3000/auth/signin | |
config-file: cypress.config.ts | |
command-prefix: pnpm dlx | |
command: "pnpm test:e2e" | |
env: | |
NEXT_PUBLIC_API_URL: ${{ secrets.CYPRESS_API_URL }} | |
NEXT_TELEMETRY_DISABLED: 1 | |
NEXTAUTH_URL: http://localhost:3000 | |
NEXTAUTH_SECRET: nyanpony | |
CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }} | |
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }} | |
CYPRESS_API_URL: ${{ secrets.CYPRESS_API_URL }} | |
# pass GitHub token to detect new build vs re-run build | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
DEBUG: "cypress:server:args" | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: ${{github.workspace}}/client/cypress/screenshots |