Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun authored May 14, 2024
1 parent 349298c commit 197c044
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,15 @@ jobs:
with:
name: unit-test
path: coverage-reports/unit
retention-days: 7
retention-days: 1

e2e-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2]
shardTotal: [2]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -44,18 +49,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x

- run: npm i
- run: npx playwright install --with-deps
- run: npm run test:e2e
- run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
env:
FORCE_COLOR: true

- uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test
name: e2e-test-shard-${{ matrix.shardIndex }}
path: coverage-reports/e2e
retention-days: 7
retention-days: 1


merge-coverage:
Expand All @@ -76,8 +82,9 @@ jobs:
- name: Download e2e coverage
uses: actions/download-artifact@v4
with:
name: e2e-test
pattern: e2e-test-shard-*
path: coverage-reports/e2e
merge-multiple: true

- name: Use Node.js
uses: actions/setup-node@v4
Expand Down

0 comments on commit 197c044

Please sign in to comment.