ci(frontend): Speed up test jobs (#8949)
- 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
This commit is contained in:
parent
e3cf605e9b
commit
582e12c766
|
@ -23,6 +23,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
|
@ -38,24 +39,12 @@ jobs:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
browser: [chromium, firefox, webkit]
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@ -66,6 +55,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: "21"
|
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
|
- name: Copy default supabase .env
|
||||||
run: |
|
run: |
|
||||||
cp ../supabase/docker/.env.example ../.env
|
cp ../supabase/docker/.env.example ../.env
|
||||||
|
@ -86,16 +81,16 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
|
||||||
- name: Install Playwright Browsers
|
- name: Install Browser '${{ matrix.browser }}'
|
||||||
run: yarn playwright install --with-deps
|
run: yarn playwright install --with-deps ${{ matrix.browser }}
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
yarn test
|
yarn test --project=${{ matrix.browser }}
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
with:
|
with:
|
||||||
name: playwright-report
|
name: playwright-report-${{ matrix.browser }}
|
||||||
path: playwright-report/
|
path: playwright-report/
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
Loading…
Reference in New Issue