Skip to content

fix(ci): add explicit toolchain input for SHA-pinned rust-toolchain #5

fix(ci): add explicit toolchain input for SHA-pinned rust-toolchain

fix(ci): add explicit toolchain input for SHA-pinned rust-toolchain #5

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, "1.70"]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
# MSRV job: test lib only (no clap, which requires newer rustc)
- name: Test lib (no default features)
if: matrix.rust != 'stable'
run: cargo test --no-default-features --lib
- name: Test lib (default features)
if: matrix.rust == 'stable'
run: cargo test --lib
- name: Test lib (fs feature)
if: matrix.rust == 'stable'
run: cargo test --features fs --lib
- name: Doc-tests
if: matrix.rust == 'stable'
run: cargo test --doc
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
- run: cargo clippy --all-targets -- -D warnings
- run: cargo clippy --all-targets --features fs -- -D warnings
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9 # master
with:
toolchain: stable
components: rustfmt
- run: cargo fmt --check
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: EmbarkStudios/cargo-deny-action@3fd3802e88374d3fe9159b834c7714ec57d6c979 # v2