@@ -12,26 +12,29 @@ jobs:
12
12
runs-on : ubuntu-latest
13
13
steps :
14
14
- uses : actions/checkout@v4
15
+ with :
16
+ fetch-depth : 100
17
+
18
+ - uses : nrwl/nx-set-shas@v3
15
19
16
20
- uses : actions/setup-node@v4
17
21
with :
18
22
node-version : " 20.x"
23
+ cache : " npm"
24
+ cache-dependency-path : " **/package-lock.json"
19
25
20
- - name : Cache node modules
26
+ - name : Cache NX
21
27
uses : actions/cache@v4
22
- env :
23
- cache-name : cache-node-modules
24
28
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 }}
28
31
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 -
32
35
33
36
- name : Install Dependencies
34
- run : npm install
37
+ run : npm ci --prefer-offline --no-audit
35
38
36
39
- name : Bootstrap packages
37
40
run : npm run bootstrap
@@ -50,19 +53,43 @@ jobs:
50
53
with :
51
54
webpackStatsFile : ./playground/dist/webpack-stats.json
52
55
artifactName : relative-ci-artifacts-editor
56
+
53
57
playwright :
54
- name : " Playwright Tests"
58
+ name : " Playwright Tests - ${{ matrix.browser }} "
55
59
runs-on : ubuntu-latest
56
60
container :
57
61
image : mcr.microsoft.com/playwright:v1.49.1-noble
62
+ strategy :
63
+ fail-fast : false
64
+ matrix :
65
+ browser : [chromium, firefox, webkit]
58
66
steps :
59
67
- uses : actions/checkout@v4
68
+ with :
69
+ fetch-depth : 100
70
+
71
+ - uses : nrwl/nx-set-shas@v3
72
+
60
73
- uses : actions/setup-node@v4
61
74
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
+
63
89
- run : apt-get update && apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
90
+
64
91
- name : Install dependencies
65
- run : npm ci
92
+ run : npm ci --prefer-offline --no-audit
66
93
67
94
- name : Build packages
68
95
run : npm run build
@@ -71,11 +98,11 @@ jobs:
71
98
run : |
72
99
npm run start:built > /dev/null &
73
100
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 }}
75
102
76
103
- uses : actions/upload-artifact@v4
77
104
if : always()
78
105
with :
79
- name : playwright-report
106
+ name : playwright-report-${{ matrix.browser }}
80
107
path : tests/playwright-report/
81
108
retention-days : 30
0 commit comments