Some checks failed
CI Demo / build (push) Successful in 3s
Docker Test / docker-ops (push) Successful in 5s
.NET Test / dotnet-test (push) Successful in 45s
Go Test / go-test (push) Successful in 19s
Java Test / java-hello (push) Successful in 33s
Julia Test / julia-test (push) Successful in 17s
Kotlin Test / kotlin-hello (push) Successful in 36s
Node.js Test / nodejs-test (push) Successful in 14s
Notebook Test / nb-test (push) Successful in 11s
PHP Test / php-test (push) Successful in 35s
Python Test / python-hello (push) Successful in 4s
R tests / test (push) Failing after 10m33s
Rust tests / test (push) Successful in 22s
Scala (sbt) tests / scala-test (push) Successful in 5s
Swift Test / swift-hello (push) Successful in 46s
34 lines
951 B
YAML
34 lines
951 B
YAML
name: Rust tests
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Run cargo tests (auto-detect)
|
|
shell: bash
|
|
run: |
|
|
set -euxo pipefail
|
|
|
|
# If there's a workspace at the repo root, test the whole thing.
|
|
if [ -f Cargo.toml ] && grep -q '^\[workspace\]' Cargo.toml; then
|
|
cargo test --workspace --all-features --verbose
|
|
exit 0
|
|
fi
|
|
|
|
# Otherwise, find all Cargo.toml files and test each crate.
|
|
mapfile -t MANIFESTS < <(git ls-files '**/Cargo.toml')
|
|
|
|
if [ ${#MANIFESTS[@]} -eq 0 ]; then
|
|
echo "No Cargo.toml found; skipping Rust tests."
|
|
exit 0
|
|
fi
|
|
|
|
for m in "${MANIFESTS[@]}"; do
|
|
echo "=== Testing $m ==="
|
|
cargo test --verbose --manifest-path "$m"
|
|
done
|