chore(deps): update actions/checkout action to v4 (#40) #115
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: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: test | |
env: | |
# Emit backtraces on panics. | |
RUST_BACKTRACE: 1 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
build: | |
- stable | |
- nightly | |
include: | |
- build: stable | |
os: ubuntu-latest | |
rust: stable | |
- build: nightly | |
os: ubuntu-latest | |
rust: nightly | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
override: true | |
- name: Load cache | |
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-${{ matrix.build }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
run: cargo build --workspace --all-features | |
- name: Run tests | |
run: cargo test --workspace --all-features | |
miri: | |
name: miri | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
components: miri | |
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2 | |
- name: Default features | |
run: cargo miri test --workspace | |
rustfmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 | |
with: | |
toolchain: stable | |
override: true | |
profile: minimal | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
docs: | |
name: Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Rust | |
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Check documentation | |
env: | |
RUSTDOCFLAGS: -D warnings | |
run: cargo doc --no-deps --document-private-items --workspace --all-features |