Skip to content

Add Rust tests

Add Rust tests #4

Workflow file for this run

name: Tests
on:
push:
branches: [ "main", "feature/github-actions" ]
pull_request:
branches: [ "main" ]
merge_group:
types: [ "checks_requested" ]
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
test:
name: Tests
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Set up stable Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ github.job }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Rust tests
run: cargo test --no-default-features --no-run
- name: Run Rust tests
run: cargo test --no-default-features