This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
[Issue #183] Opportunity Page Design Implementation #209
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: Frontend E2E Tests | |
on: | |
workflow_call: | |
pull_request: | |
paths: | |
- frontend/** | |
- .github/workflows/ci-frontend-e2e.yml | |
defaults: | |
run: | |
working-directory: ./frontend | |
env: | |
NODE_VERSION: 18 | |
LOCKFILE_PATH: ./frontend/package-lock.json | |
PACKAGE_MANAGER: npm | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
e2e-tests: | |
name: Run E2E Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: ${{ env.PACKAGE_MANAGER }} | |
cache-dependency-path: ${{ env.LOCKFILE_PATH }} | |
- run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Start API Server for e2e tests | |
run: | | |
cd ../api | |
make init db-seed-local start & | |
cd ../frontend | |
# Ensure the API wait script is executable | |
chmod +x ../api/bin/wait-for-api.sh | |
../api/bin/wait-for-api.sh | |
shell: bash | |
- name: Run E2E Tests | |
run: npm run test:e2e | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: ./frontend/playwright-report/ | |
retention-days: 30 |