Publish test report to GitHub Pages #21
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: E2E Testing | |
on: [push] | |
jobs: | |
e2e-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18.18.2" | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build frontend | |
run: MITOPEN_HOSTNAME=localhost:8063 yarn build | |
- name: Build services | |
run: docker compose -f docker-compose-e2e-tests.yml build | |
- name: Start services | |
run: docker compose -f docker-compose-e2e-tests.yml up nginx web db --detach --wait | |
- name: Apply test data | |
run: ./e2e_testing/scripts/apply-fixtures.sh | |
# - name: Run E2E tests | |
# run: docker compose -f docker-compose-e2e-tests.yml run e2e-tests | |
- name: Install Playwright Browsers | |
run: yarn --cwd e2e_testing playwright install --with-deps | |
- name: Curl home page (debug) | |
run: curl -v http://localhost:8063 | |
- name: Run E2E tests | |
run: BASE_URL=localhost:8063 CI=true yarn --cwd e2e_testing test | |
- name: Setup Pages | |
if: always() | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
if: always() | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: e2e_testing/playwright-report | |
- name: Deploy to GitHub Pages | |
if: always() | |
id: deployment | |
uses: actions/deploy-pages@v2 |