Skip to content

Commit

Permalink
Merge pull request #2268 from fermyon/run-runtime-tests
Browse files Browse the repository at this point in the history
Make sure runtime tests run in CI
  • Loading branch information
rylev authored Feb 15, 2024
2 parents 961d5a1 + 5364acb commit 3655b68
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
name: spin-static-${{ matrix.config.arch }}
path: target/${{ matrix.config.target }}/release/spin

build-rust:
build-spin:
name: Build Spin
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
path: target/release/spin${{ matrix.os == 'windows-latest' && '.exe' || '' }}


test-rust:
test-spin:
name: Test Spin
runs-on: ${{ matrix.runner }}
strategy:
Expand Down Expand Up @@ -230,5 +230,4 @@ jobs:
echo "$PWD" >> $GITHUB_PATH
- name: Run Full Integration Tests
run: |
make test-integration-full
run: make test-integration-full
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,26 @@ update-cargo-locks:

.PHONY: test-unit
test-unit:
$(LOG_LEVEL_VAR) cargo test --all --no-fail-fast -- --skip integration_tests --nocapture
$(LOG_LEVEL_VAR) cargo test --all --no-fail-fast -- --skip integration_tests --skip runtime_tests --nocapture

.PHONY: test-crate
test-crate:
$(LOG_LEVEL_VAR) cargo test -p $(crate) --no-fail-fast -- --skip integration_tests --nocapture
# Run the runtime tests without the tests that use some sort of assumed external depedency (e.g., Docker, a language toolchain, etc.)
.PHONY: test-runtime
test-runtime:
cargo test --release runtime_tests --no-default-features --no-fail-fast -- --nocapture

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

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

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

.PHONY: test-sdk-go
Expand Down
6 changes: 6 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ make test-integration
```

Note that this also runs the runtime tests as well.

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:

```bash
make test-integration-full
```
2 changes: 1 addition & 1 deletion tests/runtime-tests/tests/llm/error.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Could not read model registry directory '.spin/ai-models'
Local LLM operations are not supported in this version of Spin.

0 comments on commit 3655b68

Please sign in to comment.