Add tests #350
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_LOG: debug | |
RUST_TOOLCHAIN: nightly-2024-11-28 | |
jobs: | |
build_and_test: | |
runs-on: | |
group: ubuntu_runners | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Upgrade rust with nightly | |
run: | | |
rustup update | |
rustup toolchain install ${{ env.RUST_TOOLCHAIN }} | |
rustup default ${{ env.RUST_TOOLCHAIN }} | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | |
- name: Build | |
run: cargo build --verbose --all | |
- name: Run rust tests | |
run: cargo test --verbose --all |