File tree Expand file tree Collapse file tree 1 file changed +28
-5
lines changed
Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,39 @@ jobs:
1010 test :
1111 timeout-minutes : 30
1212 runs-on : ubuntu-latest
13+ strategy :
14+ matrix :
15+ unit : [
16+ cascading,
17+ comma,
18+ ignored,
19+ import,
20+ nth-child,
21+ selector
22+ ]
1323 steps :
1424 - uses : actions/checkout@v3
1525 - uses : actions/setup-node@v3
1626 with :
1727 node-version : 18
18- - name : Install Dependencies
28+ cache : ' npm'
29+ - name : Install dependencies
1930 run : npm ci
20- - name : Install Test Server Dependencies
31+ - name : Install test server dependencies
2132 run : cd test-server && npm ci
22- - name : Install Playwright Browsers
33+ - name : Get Playwright version
34+ id : playwright-version
35+ run : echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').dependencies['@playwright/test'].version)")" >> $GITHUB_ENV
36+ - name : Cache Playwright binaries
37+ uses : actions/cache@v3
38+ id : playwright-cache
39+ with :
40+ key : playwright-${{ env.PLAYWRIGHT_VERSION }}
41+ path : ~/.cache/ms-playwright
42+ - if : ${{ steps.playwright-cache.outputs.cache-hit != 'true' }}
43+ name : Install Playwright browsers
2344 run : npx playwright install --with-deps
24- - name : Run Unit Tests
25- run : npm run test
45+ - name : Build
46+ run : npm run build
47+ - name : Run ${{ matrix.unit }} unit test
48+ run : npx playwright test ${{ matrix.unit }}
You can’t perform that action at this time.
0 commit comments