Skip to content

Commit e05167b

Browse files
author
Adam McKee
committed
overhaul fixture testing to run on matrix of node version
1 parent 3378877 commit e05167b

File tree

15 files changed

+627
-484
lines changed

15 files changed

+627
-484
lines changed

.github/workflows/verify.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
- fmt
2626
- lint
2727
- test
28-
- test-node-runtime-fixtures
28+
- test-fixtures-linux
29+
- test-fixtures-osx-win
2930
steps:
3031
- run: echo "We're gonna face it"
3132

@@ -140,35 +141,52 @@ jobs:
140141
continue-on-error: true
141142

142143
test:
143-
runs-on: ${{ matrix.runs-on }}
144+
runs-on: ${{ matrix.runs_on }}
144145
strategy:
145146
matrix:
146-
runs-on: [macos-latest, ubuntu-latest, windows-latest]
147+
runs_on: [macos-latest, ubuntu-latest, windows-latest]
147148
steps:
148149
- uses: actions/checkout@v4
149-
- uses: actions/setup-node@v4
150-
with:
151-
node-version: 20
152150
- run: rustup install stable
153151
- uses: swatinem/rust-cache@v2
154152
- name: cargo test
153+
env:
154+
SKIP_BUILD_FIXTURES: true
155155
run: cargo test --workspace
156156

157-
test-node-runtime-fixtures:
157+
test-fixtures-linux:
158+
runs-on: ubuntu-latest
159+
steps:
160+
- uses: actions/checkout@v4
161+
- run: rustup install stable
162+
- uses: swatinem/rust-cache@v2
163+
- name: nvm
164+
run: |
165+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
166+
\. ~/.nvm/nvm.sh
167+
nvm install 18
168+
nvm install 20
169+
nvm install 22
170+
nvm install 24
171+
- name: cargo test
172+
run: cargo test -p l3_fn_build testing
173+
174+
test-fixtures-osx-win:
158175
runs-on: ${{ matrix.runs_on }}
159176
strategy:
160177
matrix:
161-
node_version: [18, 20, 22, 23]
162-
runs_on: [macos-latest, ubuntu-latest, windows-latest]
178+
runs_on: [macos-latest, windows-latest]
163179
steps:
164180
- uses: actions/checkout@v4
165181
- uses: actions/setup-node@v4
166182
with:
167-
node-version: ${{ matrix.node_version }}
183+
node-version: 22
168184
- run: rustup install stable
169185
- uses: swatinem/rust-cache@v2
170186
- name: cargo test
171-
run: cargo test -p l3_fn_build testing::test_node_fixtures
187+
env:
188+
SKIP_NVM: true
189+
run: cargo test -p l3_fn_build testing
172190

173191
test-cli-build:
174192
runs-on: ${{ matrix.runs_on }}

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fn_build/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ tokio = { workspace = true, features = ["macros", "rt", "sync"] }
2929
zip = { version = "5.1.1", default-features = false, features = ["deflate"] }
3030

3131
[dev-dependencies]
32+
l3_fn_config = { path = "../fn_config", version = "0.0.1" }
3233
temp-dir = { workspace = true }
3334
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "sync", "test-util"] }

0 commit comments

Comments
 (0)