Bring the CI config to 2024 #112
Workflow file for this run
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: | ||
pull_request: | ||
workflow_dispatch: # Kept for manual triggers | ||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-D warnings" # Treat all warnings as errors | ||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run cargo check | ||
run: cargo check --all-targets --all-features | ||
test: | ||
name: Test Suite | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
rust: [stable, beta] | ||
include: | ||
- os: ubuntu-latest | ||
rust: nightly | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@${{ matrix.rust }} | ||
Check failure on line 38 in .github/workflows/base62.yml GitHub Actions / ciInvalid workflow file
|
||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run tests | ||
run: cargo test --all-targets --all-features | ||
- name: Run doc tests | ||
run: cargo test --doc | ||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: Check formatting | ||
run: cargo fmt --all -- --check | ||
clippy: | ||
name: Clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run clippy | ||
run: cargo clippy --all-targets --all-features | ||
docs: | ||
name: Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Check documentation | ||
env: | ||
RUSTDOCFLAGS: "-D warnings" | ||
run: cargo doc --no-deps --document-private-items | ||