Skip to content

Commit 3655b68

Browse files
authored
Merge pull request #2268 from fermyon/run-runtime-tests
Make sure runtime tests run in CI
2 parents 961d5a1 + 5364acb commit 3655b68

File tree

4 files changed

+22
-11
lines changed

4 files changed

+22
-11
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
name: spin-static-${{ matrix.config.arch }}
113113
path: target/${{ matrix.config.target }}/release/spin
114114

115-
build-rust:
115+
build-spin:
116116
name: Build Spin
117117
runs-on: ${{ matrix.os }}
118118
strategy:
@@ -140,7 +140,7 @@ jobs:
140140
path: target/release/spin${{ matrix.os == 'windows-latest' && '.exe' || '' }}
141141

142142

143-
test-rust:
143+
test-spin:
144144
name: Test Spin
145145
runs-on: ${{ matrix.runner }}
146146
strategy:
@@ -230,5 +230,4 @@ jobs:
230230
echo "$PWD" >> $GITHUB_PATH
231231
232232
- name: Run Full Integration Tests
233-
run: |
234-
make test-integration-full
233+
run: make test-integration-full

Makefile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,26 @@ update-cargo-locks:
4949

5050
.PHONY: test-unit
5151
test-unit:
52-
$(LOG_LEVEL_VAR) cargo test --all --no-fail-fast -- --skip integration_tests --nocapture
52+
$(LOG_LEVEL_VAR) cargo test --all --no-fail-fast -- --skip integration_tests --skip runtime_tests --nocapture
5353

54-
.PHONY: test-crate
55-
test-crate:
56-
$(LOG_LEVEL_VAR) cargo test -p $(crate) --no-fail-fast -- --skip integration_tests --nocapture
54+
# Run the runtime tests without the tests that use some sort of assumed external depedency (e.g., Docker, a language toolchain, etc.)
55+
.PHONY: test-runtime
56+
test-runtime:
57+
cargo test --release runtime_tests --no-default-features --no-fail-fast -- --nocapture
58+
59+
# Run all of the runtime tests including those that use some sort of assumed external depedency (e.g., Docker, a language toolchain, etc.)
60+
.PHONY: test-runtime-full
61+
test-runtime-full:
62+
cargo test --release runtime_tests --no-default-features --features extern-dependencies-tests --no-fail-fast -- --nocapture
5763

5864
# Run the integration tests without the tests that use some sort of assumed external depedency (e.g., Docker, a language toolchain, etc.)
5965
.PHONY: test-integration
60-
test-integration:
66+
test-integration: test-runtime
6167
cargo test --release integration_tests --no-default-features --no-fail-fast -- --nocapture
6268

6369
# Run all of the integration tests including those that use some sort of assumed external depedency (e.g., Docker, a language toolchain, etc.)
6470
.PHONY: test-integration-full
65-
test-integration-full:
71+
test-integration-full: test-runtime-full
6672
cargo test --release integration_tests --no-default-features --features extern-dependencies-tests --no-fail-fast -- --nocapture
6773

6874
.PHONY: test-sdk-go

tests/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ make test-integration
3636
```
3737

3838
Note that this also runs the runtime tests as well.
39+
40+
This will not run the full integration test suite, but a subset that only relies the presence of Rust and Python toolchains. The full integration test suite runs tests that rely on Docker and some additional compiler toolchains (e.g., Swift, Zig, etc.). Eventually, we want to only require the presence of Docker, but we're not quite there yet. You can run the full test suite like so:
41+
42+
```bash
43+
make test-integration-full
44+
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Could not read model registry directory '.spin/ai-models'
1+
Local LLM operations are not supported in this version of Spin.

0 commit comments

Comments
 (0)