66 pull_request :
77 types : [opened, synchronize, reopened, edited]
88
9+ env :
10+ NX_REJECT_UNKNOWN_LOCAL_CACHE : 0
11+
912jobs :
1013 build :
1114 name : Build
1215 runs-on : ubuntu-latest
16+ timeout-minutes : 60
1317 steps :
1418 - uses : actions/checkout@v4
1519 with :
1620 fetch-depth : 100
1721
22+ - name : Install pnpm
23+ uses : pnpm/action-setup@v4
24+
1825 - uses : nrwl/nx-set-shas@v3
1926
2027 - uses : actions/setup-node@v4
2128 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 "
2532
2633 - name : Cache NX
2734 uses : actions/cache@v4
2835 with :
29- path : node_modules/.cache/ nx/
36+ path : . nx/cache
3037 key : nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
3138 restore-keys : |
3239 nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
3340 nx-${{ env.NX_BRANCH }}-
3441 nx-
3542
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
3645 - 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
4147
4248 - name : Lint packages
43- run : npm run lint
49+ run : pnpm run lint
4450
4551 - name : Build packages
46- run : npm run build
52+ run : pnpm run build
4753
4854 - name : Run unit tests
49- run : npm run test
55+ run : pnpm run test
5056
5157 - name : Upload webpack stats artifact (editor)
5258 uses : relative-ci/agent-upload-artifact-action@v2
5359 with :
5460 webpackStatsFile : ./playground/dist/webpack-stats.json
5561 artifactName : relative-ci-artifacts-editor
5662
63+ - name : Soft release
64+ id : soft-release
65+ run : pnpx pkg-pr-new publish './packages/*' # --compact enable compact after release
66+
5767 playwright :
5868 name : " Playwright Tests - ${{ matrix.browser }}"
5969 runs-on : ubuntu-latest
70+ timeout-minutes : 60
6071 container :
61- image : mcr.microsoft.com/playwright:v1.49 .1-noble
72+ image : mcr.microsoft.com/playwright:v1.51 .1-noble
6273 strategy :
6374 fail-fast : false
6475 matrix :
@@ -68,37 +79,38 @@ jobs:
6879 with :
6980 fetch-depth : 100
7081
82+ - name : Install pnpm
83+ uses : pnpm/action-setup@v4
84+
7185 - uses : nrwl/nx-set-shas@v3
7286
7387 - uses : actions/setup-node@v4
7488 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 "
7892
7993 - name : Cache NX
8094 uses : actions/cache@v4
8195 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 }}
8498 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 }}-
87101 nx-
88102
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
90104
91105 - name : Install dependencies
92- run : npm ci --prefer-offline --no-audit
106+ run : pnpm install
93107
94108 - name : Build packages
95- run : npm run build
109+ run : pnpm run build
96110
97111 - name : Run server and Playwright tests
98112 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
102114
103115 - uses : actions/upload-artifact@v4
104116 if : always()
0 commit comments