Skip to content

Commit 029df7a

Browse files
authored
chore(repo): migrate GitHub workflows to use mise for dev tools (#33772)
## Summary Migrates GitHub workflows to use [mise](https://mise.jdx.dev/) for managing development tool installations instead of individual setup actions. ## Changes - **mise.toml**: Added [email protected] to tool configuration - **ci.yml**: Replaced pnpm, node, rust, and java setup actions with `mise-action@v3` in both Linux and macOS jobs - **e2e-matrix.yml**: Replaced all tool setup actions with mise-action in preinstall and e2e jobs - **publish.yml**: Replaced tool setup actions with mise-action in build and publish jobs - **codeql workflows**: Updated to use `mise-action@v3` ## Benefits - **Single source of truth**: All tool versions defined in `mise.toml` - **Faster CI setup**: Mise provides better caching than individual actions - **Consistency**: Same tool versions across local dev and CI - **Easier maintenance**: Update versions in one place ## Test Plan - [ ] CI workflow passes on Linux - [ ] CI workflow passes on macOS - [ ] E2E matrix builds successfully - [ ] Publish workflow can run (test with dry-run if possible) - [ ] CodeQL scans complete successfully Fixes #ISSUE_NUMBER
1 parent 7342e60 commit 029df7a

File tree

6 files changed

+56
-120
lines changed

6 files changed

+56
-120
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,13 @@ jobs:
5757
- name: Install Chrome
5858
uses: browser-actions/setup-chrome@2dbff04819ebbfd5c974947148805a825b8a07fd # v2.1.0
5959

60-
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d # v4.1.0
61-
name: Install pnpm
62-
with:
63-
version: 10.11.1
64-
run_install: false
65-
66-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
67-
with:
68-
node-version: 24
69-
cache: 'pnpm'
60+
- name: Setup dev tools with mise
61+
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
7062

71-
- name: Install Rust
72-
uses: actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
73-
with:
74-
rustflags: ''
75-
76-
- name: Setup Java
77-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
78-
with:
79-
distribution: temurin
80-
java-version: 17
81-
cache: maven
63+
- name: Enable corepack and install pnpm
64+
run: |
65+
corepack enable
66+
corepack prepare --activate
8267
8368
- name: Setup Gradle
8469
uses: gradle/actions/setup-gradle@48b5f213c81028ace310571dc5ec0fbbca0b2947 # v4.4.3
@@ -150,10 +135,13 @@ jobs:
150135
run: git fetch origin master:master
151136
if: ${{ github.event_name == 'pull_request' }}
152137

153-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
154-
with:
155-
node-version: 24
156-
package-manager-cache: false
138+
- name: Setup dev tools with mise
139+
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
140+
141+
- name: Enable corepack and install pnpm
142+
run: |
143+
corepack enable
144+
corepack prepare --activate
157145
158146
- name: Set SHAs
159147
uses: nrwl/nx-set-shas@1859e66a83ac9be0dceecbd9a023702e27ac47f4 # v4.3.3
@@ -289,33 +277,6 @@ jobs:
289277
~/Library/Caches/Homebrew
290278
key: nrwl-nx-homebrew-packages
291279

292-
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d # v4.1.0
293-
if: steps.check-changes.outputs.has_changes == 'true'
294-
name: Install pnpm
295-
with:
296-
version: 10.11.1
297-
run_install: false
298-
299-
- name: Get pnpm store directory
300-
if: steps.check-changes.outputs.has_changes == 'true'
301-
id: pnpm-cache
302-
run: echo "path=$(pnpm store path)" >> $GITHUB_OUTPUT
303-
304-
- name: Cache pnpm store
305-
if: steps.check-changes.outputs.has_changes == 'true'
306-
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
307-
with:
308-
path: ${{ steps.pnpm-cache.outputs.path }}
309-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
310-
restore-keys: |
311-
${{ runner.os }}-pnpm-store-
312-
313-
- name: Install Rust
314-
if: steps.check-changes.outputs.has_changes == 'true'
315-
uses: actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
316-
with:
317-
rustflags: ''
318-
319280
- name: Install project dependencies
320281
if: steps.check-changes.outputs.has_changes == 'true'
321282
run: |

.github/workflows/codeql-master.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ jobs:
6666
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6767

6868
- name: Setup Language Tooling
69-
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2
69+
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
70+
71+
- name: Enable corepack and install pnpm
72+
run: |
73+
corepack enable
74+
corepack prepare --activate
7075
7176
# Add any setup steps before running the `github/codeql-action/init` action.
7277
# This includes steps like installing compilers or runtimes (`actions/setup-node`

.github/workflows/codeql-pr.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@ jobs:
6161
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6262

6363
- name: Setup Language Tooling
64-
uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2
64+
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
65+
66+
- name: Enable corepack and install pnpm
67+
run: |
68+
corepack enable
69+
corepack prepare --activate
6570
6671
# Add any setup steps before running the `github/codeql-action/init` action.
6772
# This includes steps like installing compilers or runtimes (`actions/setup-node`

.github/workflows/e2e-matrix.yml

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ jobs:
5151
fetch-depth: 0
5252
filter: tree:0
5353

54-
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d # v4.1.0
55-
name: Install pnpm
54+
- name: Setup dev tools with mise
55+
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
5656
with:
57-
version: 10.11.1
58-
run_install: false
57+
mise_toml: |
58+
[tools]
59+
node = "${{ matrix.node_version }}"
5960
60-
- name: Set node
61-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
62-
with:
63-
node-version: ${{ matrix.node_version }}
64-
cache: 'pnpm'
61+
- name: Enable corepack and install pnpm
62+
run: |
63+
corepack enable
64+
corepack prepare --activate
6565
6666
- name: Get pnpm store directory
6767
id: pnpm-cache
@@ -154,39 +154,17 @@ jobs:
154154
- name: Prepare dir for output
155155
run: mkdir -p outputs
156156

157-
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d # v4.1.0
158-
name: Install pnpm
157+
- name: Setup dev tools with mise
158+
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
159159
with:
160-
version: 10.11.1
161-
run_install: false
160+
mise_toml: |
161+
[tools]
162+
node = "${{ matrix.node_version }}"
162163
163-
- name: Use Node.js ${{ matrix.node_version }}
164-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
165-
with:
166-
node-version: ${{ matrix.node_version }}
167-
cache: 'pnpm'
168-
169-
- name: Install Rust
170-
if: ${{ matrix.os != 'windows-latest' }}
164+
- name: Enable corepack and install pnpm
171165
run: |
172-
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh -s -- -y
173-
source "$HOME/.cargo/env"
174-
rustup toolchain install 1.70.0
175-
176-
- name: Load Cargo Env
177-
if: ${{ matrix.os != 'windows-latest' }}
178-
run: echo "PATH=$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV
179-
180-
- name: Setup .NET 9
181-
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
182-
with:
183-
dotnet-version: '9.0.x'
184-
185-
- name: Install bun
186-
if: ${{ matrix.os != 'windows-latest' }}
187-
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
188-
with:
189-
bun-version: latest
166+
corepack enable
167+
corepack prepare --activate
190168
191169
- name: Install packages
192170
run: |

.github/workflows/publish.yml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -303,24 +303,15 @@ jobs:
303303
repository: ${{ needs.resolve-required-data.outputs.repo || github.repository }}
304304
ref: ${{ needs.resolve-required-data.outputs.ref || github.ref }}
305305

306-
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d # v4.1.0
307-
with:
308-
version: ${{ env.PNPM_VERSION }}
309-
310-
- name: Setup node
311-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
306+
- name: Setup dev tools with mise
307+
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
312308
if: ${{ !matrix.settings.docker }}
313-
with:
314-
node-version: ${{ env.NODE_VERSION }}
315-
check-latest: true
316-
cache: 'pnpm'
317309

318-
- name: Install
319-
uses: actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
310+
- name: Enable corepack and install pnpm
320311
if: ${{ !matrix.settings.docker }}
321-
with:
322-
target: ${{ matrix.settings.target }}
323-
rustflags: ''
312+
run: |
313+
corepack enable
314+
corepack prepare --activate
324315
325316
- name: Cache cargo
326317
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
@@ -523,18 +514,14 @@ jobs:
523514
repository: ${{ needs.resolve-required-data.outputs.repo || github.repository }}
524515
ref: ${{ needs.resolve-required-data.outputs.ref || github.ref }}
525516

526-
- uses: pnpm/action-setup@7088e561eb65bb68695d245aa206f005ef30921d # v4.1.0
527-
with:
528-
version: ${{ env.PNPM_VERSION }}
517+
- name: Setup dev tools with mise
518+
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3
519+
520+
- name: Enable corepack and install pnpm
521+
run: |
522+
corepack enable
523+
corepack prepare --activate
529524
530-
- name: Setup node
531-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
532-
with:
533-
node-version: ${{ env.NODE_VERSION }}
534-
registry-url: 'https://registry.npmjs.org'
535-
check-latest: true
536-
cache: 'pnpm'
537-
538525
- name: Use npm 11.5.2
539526
run: npm install -g [email protected]
540527

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tools]
2+
bun = "1.3"
23
dotnet = "9"
34
java = "24"
45
node = "24"
56
rust = "1.90.0"
6-
bun = "1.3"

0 commit comments

Comments
 (0)