Skip to content

move away from tower #26

move away from tower

move away from tower #26

Workflow file for this run

name: Rust Test
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: ~/.cargo/registry, ~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: stable
- name: Install cargo-nextest
run: cargo install cargo-nextest --locked
- name: Run tests on the root project
run: cargo nextest run
- name: Run tests on example crates
run: |
for example in examples/*/; do
if [ -f "$example/Cargo.toml" ]; then
echo "Running tests for $example"
(cd $example && cargo test)
fi
done
- name: Install cargo-tarpaulin for coverage
run: cargo install cargo-tarpaulin
- name: Run coverage with cargo-tarpaulin
run: cargo tarpaulin --out Xml
if: success()
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v5
with:
file: ./target/debug/deps/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
if: success()