Skip to content

End-to-end tests

End-to-end tests #458

Workflow file for this run

name: End-to-end tests
on:
workflow_run:
workflows: ["Main"]
types:
- completed
branch:
- main
jobs:
e2e:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: Staging
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --version
- name: Install
run: yarn --immutable
- name: Run cypress tests
run: yarn workspace @zerologementvacant/e2e start
env:
CYPRESS_API: ${{ vars.API_HOST }}
CYPRESS_BASE_URL: ${{ vars.HOST }}
CYPRESS_EMAIL: ${{ secrets.CYPRESS_EMAIL }}
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: e2e/cypress/screenshots
retention-days: 7