Update .gitea/workflows/rust-test.yml
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
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
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Rust test
|
||||
name: Rust tests
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
@@ -7,4 +7,27 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- run: cargo test --verbose
|
||||
|
||||
- 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
|
||||
|
Reference in New Issue
Block a user