6
6
pull_request :
7
7
types : [opened, synchronize, reopened, edited]
8
8
9
+ env :
10
+ NX_REJECT_UNKNOWN_LOCAL_CACHE : 0
11
+
9
12
jobs :
10
13
build :
11
14
name : Build
12
15
runs-on : ubuntu-latest
16
+ timeout-minutes : 60
13
17
steps :
14
18
- uses : actions/checkout@v4
15
19
with :
16
20
fetch-depth : 100
17
21
22
+ - name : Install pnpm
23
+ uses : pnpm/action-setup@v4
24
+
18
25
- uses : nrwl/nx-set-shas@v3
19
26
20
27
- uses : actions/setup-node@v4
21
28
with :
22
- node-version : " 20.x "
23
- cache : " npm "
24
- cache-dependency-path : " **/package-lock.json "
29
+ cache : " pnpm "
30
+ cache-dependency-path : " **/pnpm-lock.yaml "
31
+ node-version-file : " .nvmrc "
25
32
26
33
- name : Cache NX
27
34
uses : actions/cache@v4
28
35
with :
29
- path : node_modules/.cache/ nx/
36
+ path : . nx/cache
30
37
key : nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
31
38
restore-keys : |
32
39
nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
33
40
nx-${{ env.NX_BRANCH }}-
34
41
nx-
35
42
43
+ # This is needed for the canvas dep, Tiptap V3 should remove the need for this
44
+ - run : sudo apt-get update && sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev pkg-config
36
45
- name : Install Dependencies
37
- run : npm ci --prefer-offline --no-audit
38
-
39
- - name : Bootstrap packages
40
- run : npm run bootstrap
46
+ run : pnpm install
41
47
42
48
- name : Lint packages
43
- run : npm run lint
49
+ run : pnpm run lint
44
50
45
51
- name : Build packages
46
- run : npm run build
52
+ run : pnpm run build
47
53
48
54
- name : Run unit tests
49
- run : npm run test
55
+ run : pnpm run test
50
56
51
57
- name : Upload webpack stats artifact (editor)
52
58
uses : relative-ci/agent-upload-artifact-action@v2
53
59
with :
54
60
webpackStatsFile : ./playground/dist/webpack-stats.json
55
61
artifactName : relative-ci-artifacts-editor
56
62
63
+ - name : Soft release
64
+ id : soft-release
65
+ run : pnpx pkg-pr-new publish './packages/*' # --compact enable compact after release
66
+
57
67
playwright :
58
68
name : " Playwright Tests - ${{ matrix.browser }}"
59
69
runs-on : ubuntu-latest
70
+ timeout-minutes : 60
60
71
container :
61
- image : mcr.microsoft.com/playwright:v1.49 .1-noble
72
+ image : mcr.microsoft.com/playwright:v1.51 .1-noble
62
73
strategy :
63
74
fail-fast : false
64
75
matrix :
@@ -68,37 +79,38 @@ jobs:
68
79
with :
69
80
fetch-depth : 100
70
81
82
+ - name : Install pnpm
83
+ uses : pnpm/action-setup@v4
84
+
71
85
- uses : nrwl/nx-set-shas@v3
72
86
73
87
- uses : actions/setup-node@v4
74
88
with :
75
- node-version : " 20.x "
76
- cache : " npm "
77
- cache-dependency-path : " **/package-lock.json "
89
+ cache : " pnpm "
90
+ cache-dependency-path : " **/pnpm-lock.yaml "
91
+ node-version-file : " .nvmrc "
78
92
79
93
- name : Cache NX
80
94
uses : actions/cache@v4
81
95
with :
82
- path : node_modules/.cache/ nx/
83
- key : nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
96
+ path : . nx/cache
97
+ key : nx-${{ matrix.browser }}-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
84
98
restore-keys : |
85
- nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
86
- nx-${{ env.NX_BRANCH }}-
99
+ nx-${{ matrix.browser }}-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
100
+ nx-${{ matrix.browser }}-${{ env.NX_BRANCH }}-
87
101
nx-
88
102
89
- - run : apt-get update && apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
103
+ - run : apt-get update && apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev pkg-config
90
104
91
105
- name : Install dependencies
92
- run : npm ci --prefer-offline --no-audit
106
+ run : pnpm install
93
107
94
108
- name : Build packages
95
- run : npm run build
109
+ run : pnpm run build
96
110
97
111
- name : Run server and Playwright tests
98
112
run : |
99
- npm run start:built > /dev/null &
100
- npx wait-on http://localhost:3000
101
- cd tests && HOME=/root npx playwright test --project ${{ matrix.browser }}
113
+ HOME=/root PLAYWRIGHT_CONFIG="--project ${{ matrix.browser }}" pnpm run e2e
102
114
103
115
- uses : actions/upload-artifact@v4
104
116
if : always()
0 commit comments