Skip to content

Update github actions #418

Update github actions

Update github actions #418

Workflow file for this run

name: Rust
on:
push:
branches: [main]
pull_request:
branches: [main, "**"]
paths-ignore:
- "CHANGELOG.md"
# schedule:
# - cron: "0 3 * * 0-6"
jobs:
info:
name: Rust Info
runs-on: ubuntu-latest
steps:
- name: Rustup Show
shell: bash
run: rustup show
- name: Rustup Version
shell: bash
run: rustup --version
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
- run: cargo check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
# update `cargo-expand` accordingly, when bumping MSRV:
toolchain: 1.88.0
components: rust-src
- uses: cargo-bins/cargo-binstall@f8ce4d55b131f4a1e373b8747ca6b6a54133ae5a # v1.18.0
- run: cargo binstall cargo-expand@1.0.95 --no-confirm
- run: cargo test -- --test-threads=1
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
components: clippy
- run: cargo clippy -- -D warnings
minimal_versions:
name: Compile and test with minimal versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: nightly
- uses: taiki-e/install-action@2d76ddb5414c2b7ea4c908f2326bc413825c5c76 # cargo-hack
- uses: taiki-e/install-action@f5c1e814b19a16c1055db236cc79ce780529172e # cargo-minimal-versions
- name: minimal-versions check
run: cargo minimal-versions check --workspace --all-features --ignore-private -v
- name: minimal-versions build
run: cargo minimal-versions build --workspace --all-features --ignore-private -v
- name: minimal-versions test
run: cargo minimal-versions test --release --workspace --all-features -v
continue-on-error: true
msrv:
name: Verify minimal supported rust version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: nightly
- uses: taiki-e/install-action@2d76ddb5414c2b7ea4c908f2326bc413825c5c76 # cargo-hack
- run: cargo hack check --rust-version --lib --ignore-private