feat: Add Insta Snapshot Testing #220
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
runs-on: ubuntu-24.04 | |
env: | |
FORCE_COLOR: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: crate-ci/typos@master | |
- uses: Swatinem/rust-cache@v2 | |
- run: rm rust-toolchain.toml | |
shell: bash | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
- name: Cargo version | |
run: cargo --version | |
- name: Check format | |
run: cargo fmt --all -- --check | |
- name: Check clippy | |
run: cargo clippy --all-targets --all-features -- --deny warnings | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest, macos-latest, ubuntu-latest ] | |
rust: [ "1.80.0", "stable", "nightly" ] | |
env: | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- run: rm rust-toolchain.toml | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- uses: taiki-e/install-action@v2 | |
with: | |
tool: nextest,cargo-nextest | |
- name: Cargo version | |
run: cargo --version | |
- name: Build | |
run: cargo build --workspace --all-targets | |
- name: Run tests | |
run: | | |
cargo nextest run --workspace | |
cargo test --doc | |
- name: Run examples | |
run: | | |
cargo run --example asynchronous | |
cargo run --example synchronous | |
cargo run --example basic | |
cargo run --package test-statically-disable |