|
1 | 1 | name: Setup CI dependencies |
2 | 2 | description: Install workspace dependencies and Playwright browsers for CI jobs. |
3 | 3 |
|
| 4 | +inputs: |
| 5 | + install-playwright: |
| 6 | + description: Install Playwright browser and system dependencies. |
| 7 | + default: 'true' |
| 8 | + |
4 | 9 | runs: |
5 | 10 | using: composite |
6 | 11 | steps: |
7 | | - - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d |
8 | | - with: |
9 | | - version: 11.0.8 |
10 | | - run_install: false |
11 | | - - uses: actions/setup-node@v6 |
| 12 | + - uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d |
12 | 13 | with: |
13 | | - node-version-file: './.nvmrc' |
14 | | - registry-url: 'https://registry.npmjs.org' |
15 | | - cache: 'pnpm' |
16 | | - - uses: actions/setup-go@v6 |
| 14 | + version: 2026.6.14 |
| 15 | + install: true |
| 16 | + cache: true |
| 17 | + - name: Resolve pnpm store path |
| 18 | + id: pnpm-store |
| 19 | + shell: bash |
| 20 | + run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" |
| 21 | + - name: Cache pnpm store |
| 22 | + uses: actions/cache@v5 |
17 | 23 | with: |
18 | | - go-version: '1.26.x' |
19 | | - cache: false |
| 24 | + path: ${{ steps.pnpm-store.outputs.path }} |
| 25 | + key: ${{ runner.os }}-${{ runner.arch }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}-v1 |
| 26 | + restore-keys: ${{ runner.os }}-${{ runner.arch }}-pnpm-store- |
20 | 27 | - name: Install dependencies |
21 | 28 | shell: bash |
22 | 29 | run: pnpm install --frozen-lockfile |
23 | | - - name: Cache Vale |
| 30 | + - name: Cache Vale styles |
24 | 31 | uses: actions/cache@v5 |
25 | 32 | with: |
26 | 33 | path: | |
27 | | - config/vale/bin |
28 | 34 | config/vale/styles/Google |
29 | 35 | config/vale/styles/write-good |
30 | | - key: ${{ runner.os }}-${{ runner.arch }}-vale-${{ hashFiles('.vale.ini', 'config/vale/install.mjs') }}-v1 |
31 | | - - name: Install Vale |
| 36 | + key: ${{ runner.os }}-${{ runner.arch }}-vale-styles-${{ hashFiles('.vale.ini') }}-v1 |
| 37 | + - name: Sync Vale styles |
32 | 38 | shell: bash |
33 | | - run: node config/vale/install.mjs |
| 39 | + run: vale sync |
34 | 40 | - name: Resolve Playwright version |
| 41 | + if: inputs.install-playwright == 'true' |
35 | 42 | id: playwright-version |
36 | 43 | shell: bash |
37 | 44 | run: echo "version=$(node -p 'require("./node_modules/playwright/package.json").version')" >> "$GITHUB_OUTPUT" |
38 | 45 | - name: Cache Playwright browsers |
| 46 | + if: inputs.install-playwright == 'true' |
39 | 47 | id: cache-playwright |
40 | 48 | uses: actions/cache@v5 |
41 | 49 | with: |
42 | 50 | path: ~/.cache/ms-playwright |
43 | 51 | key: ${{ runner.os }}-${{ runner.arch }}-playwright-chromium-shell-${{ steps.playwright-version.outputs.version }}-v1 |
44 | | - - uses: actions/setup-node@v6 |
45 | | - with: |
46 | | - node-version: 24 |
47 | 52 | - name: Install Playwright system dependencies |
| 53 | + if: inputs.install-playwright == 'true' |
48 | 54 | shell: bash |
49 | 55 | run: node ./node_modules/playwright/cli.js install-deps chromium |
50 | 56 | - name: Install Playwright Chromium |
51 | | - if: steps.cache-playwright.outputs.cache-hit != 'true' |
| 57 | + if: inputs.install-playwright == 'true' && steps.cache-playwright.outputs.cache-hit != 'true' |
52 | 58 | shell: bash |
53 | 59 | run: node ./node_modules/playwright/cli.js install --only-shell chromium |
54 | | - - uses: actions/setup-node@v6 |
55 | | - with: |
56 | | - node-version-file: './.nvmrc' |
57 | | - registry-url: 'https://registry.npmjs.org' |
|
0 commit comments