Skip to content

Bring the CI config to 2024 #112

Bring the CI config to 2024

Bring the CI config to 2024 #112

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / ci

Invalid workflow file

The workflow is not valid. .github/workflows/base62.yml (Line: 38, Col: 15): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.rust
- 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