@@ -12,26 +12,29 @@ jobs:
1212 runs-on : ubuntu-latest
1313 steps :
1414 - uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 100
17+
18+ - uses : nrwl/nx-set-shas@v3
1519
1620 - uses : actions/setup-node@v4
1721 with :
1822 node-version : " 20.x"
23+ cache : " npm"
24+ cache-dependency-path : " **/package-lock.json"
1925
20- - name : Cache node modules
26+ - name : Cache NX
2127 uses : actions/cache@v4
22- env :
23- cache-name : cache-node-modules
2428 with :
25- # npm cache files are stored in `~/.npm` on Linux/macOS
26- path : ~/.npm
27- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
29+ path : node_modules/.cache/nx/
30+ key : nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
2831 restore-keys : |
29- ${{ runner.os }}-build- ${{ env.cache-name }}-
30- ${{ runner.os }}-build -
31- ${{ runner.os }} -
32+ nx- ${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
33+ nx- ${{ env.NX_BRANCH }}-
34+ nx -
3235
3336 - name : Install Dependencies
34- run : npm install
37+ run : npm ci --prefer-offline --no-audit
3538
3639 - name : Bootstrap packages
3740 run : npm run bootstrap
@@ -50,19 +53,43 @@ jobs:
5053 with :
5154 webpackStatsFile : ./playground/dist/webpack-stats.json
5255 artifactName : relative-ci-artifacts-editor
56+
5357 playwright :
54- name : " Playwright Tests"
58+ name : " Playwright Tests - ${{ matrix.browser }} "
5559 runs-on : ubuntu-latest
5660 container :
5761 image : mcr.microsoft.com/playwright:v1.49.1-noble
62+ strategy :
63+ fail-fast : false
64+ matrix :
65+ browser : [chromium, firefox, webkit]
5866 steps :
5967 - uses : actions/checkout@v4
68+ with :
69+ fetch-depth : 100
70+
71+ - uses : nrwl/nx-set-shas@v3
72+
6073 - uses : actions/setup-node@v4
6174 with :
62- node-version : lts/*
75+ node-version : " 20.x"
76+ cache : " npm"
77+ cache-dependency-path : " **/package-lock.json"
78+
79+ - name : Cache NX
80+ uses : actions/cache@v4
81+ with :
82+ path : node_modules/.cache/nx/
83+ key : nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
84+ restore-keys : |
85+ nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
86+ nx-${{ env.NX_BRANCH }}-
87+ nx-
88+
6389 - run : apt-get update && apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
90+
6491 - name : Install dependencies
65- run : npm ci
92+ run : npm ci --prefer-offline --no-audit
6693
6794 - name : Build packages
6895 run : npm run build
@@ -71,11 +98,11 @@ jobs:
7198 run : |
7299 npm run start:built > /dev/null &
73100 npx wait-on http://localhost:3000
74- cd tests && HOME=/root npx playwright test
101+ cd tests && HOME=/root npx playwright test --project ${{ matrix.browser }}
75102
76103 - uses : actions/upload-artifact@v4
77104 if : always()
78105 with :
79- name : playwright-report
106+ name : playwright-report-${{ matrix.browser }}
80107 path : tests/playwright-report/
81108 retention-days : 30
0 commit comments