chore(deps): bump the all-cargo-dependencies group with 3 updates (#805) #6
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
merge_group: | |
branches: [ main ] | |
jobs: | |
fmt: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read rust-toolchain.toml | |
id: toolchain | |
run: echo "version=$(grep 'channel' rust-toolchain.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.toolchain.outputs.version }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: "true" | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read rust-toolchain.toml | |
id: toolchain | |
run: echo "version=$(grep 'channel' rust-toolchain.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.toolchain.outputs.version }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: "true" | |
- name: Clippy check | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
doc: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read rust-toolchain.toml | |
id: toolchain | |
run: echo "version=$(grep 'channel' rust-toolchain.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.toolchain.outputs.version }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: "true" | |
- name: Check documentation | |
env: | |
RUSTDOCFLAGS: -D warnings | |
run: cargo doc --no-deps --all-features | |
test: | |
name: Tests (${{ matrix.os }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, macos-14] # macos-14 is for Apple Silicon | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Read rust-toolchain.toml | |
id: toolchain | |
run: echo "version=$(grep 'channel' rust-toolchain.toml | cut -d'"' -f2)" >> "$GITHUB_OUTPUT" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.toolchain.outputs.version }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: "true" | |
- name: Run tests | |
run: cargo test --all-features |