Bacpop 186 v9 db #667
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: playwright CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- "bacpop-*" | |
jobs: | |
playwright-tests: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
env: | |
STORAGE_PATH: ${{ github.workspace }}/storage/dbs | |
strategy: | |
fail-fast: false | |
matrix: | |
browser: [chromium, firefox, webkit] | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to GHCR (GitHub Packages) | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Restore storage cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.STORAGE_PATH }} | |
key: dbs-cache-${{ runner.os }} | |
restore-keys: | | |
dbs-cache- | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: ./app/client-v2/package-lock.json | |
- name: get config file | |
run: | | |
pwd | |
cp ./app/server/src/resources/config.json.in.development ./app/server/src/resources/config.json | |
- name: Run all components | |
working-directory: . | |
run: ./scripts/run_test -mount ${{ env.STORAGE_PATH }} | |
- name: Install playwright | |
working-directory: ./app/client-v2 | |
run: npx playwright install --with-deps | |
- name: Run e2e tests | |
env: | |
MICROREACT_TOKEN: ${{ secrets.MICROREACT_TOKEN }} | |
working-directory: ./app/client-v2 | |
run: npm run test:e2e:${{ matrix.browser}} | |
- name: Stop all components | |
if: always() | |
working-directory: . | |
run: ./scripts/stop_test | |
- name: Upload blob report to GitHub Actions Artifacts | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: blob-report-${{ matrix.browser }} | |
path: app/client-v2/blob-report | |
retention-days: 1 | |
merge-reports: | |
defaults: | |
run: | |
working-directory: ./app/client-v2 | |
# Merge reports after playwright-tests | |
if: ${{ !cancelled() }} | |
needs: [playwright-tests] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install dependencies | |
run: npm ci | |
- name: Download blob reports from GitHub Actions Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: app/client-v2/all-blob-reports | |
pattern: blob-report-* | |
merge-multiple: true | |
- name: Merge into HTML Report | |
run: npx playwright merge-reports --reporter html ./all-blob-reports | |
- name: Upload HTML report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: html-report--attempt-${{ github.run_attempt }} | |
path: app/client-v2/playwright-report | |
retention-days: 14 |