Skip to content

Commit

Permalink
ci(frontend): Speed up test jobs (#8949)
Browse files Browse the repository at this point in the history
- Resolves #8948

### Changes 🏗️

- Parallelize frontend test job into a per-browser matrix
- Speed up "Free Disk Space" step by disabling removal of large system
packages
  • Loading branch information
Pwuts authored Dec 12, 2024
1 parent e3cf605 commit 582e12c
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/platform-frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
Expand All @@ -38,24 +39,12 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: false
dotnet: false
haskell: false
large-packages: true
docker-images: true
swap-storage: true

- name: Checkout repository
uses: actions/checkout@v4
with:
Expand All @@ -66,6 +55,12 @@ jobs:
with:
node-version: "21"

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false # slow
docker-images: false # limited benefit

- name: Copy default supabase .env
run: |
cp ../supabase/docker/.env.example ../.env
Expand All @@ -86,16 +81,16 @@ jobs:
run: |
cp .env.example .env
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Install Browser '${{ matrix.browser }}'
run: yarn playwright install --with-deps ${{ matrix.browser }}

- name: Run tests
run: |
yarn test
yarn test --project=${{ matrix.browser }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
name: playwright-report-${{ matrix.browser }}
path: playwright-report/
retention-days: 30

0 comments on commit 582e12c

Please sign in to comment.