Skip to content

Update ci.yml

Update ci.yml #3

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 22, Col: 13): Matrix exclude key 'rust' does not match any key within the matrix, (Line: 24, Col: 13): Matrix exclude key 'rust' does not match any key within the matrix
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
# Only test beta on ubuntu to reduce CI load
- os: windows-latest
rust: beta
- os: macos-latest
rust: beta
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build (default features)
run: cargo build --verbose
- name: Build (no default features)
run: cargo build --no-default-features --verbose
- name: Build (all features)
run: cargo build --all-features --verbose
- name: Run tests
run: cargo test --verbose
- name: Run tests (no default features)
run: cargo test --no-default-features --verbose
- name: Run tests (all features)
run: cargo test --all-features --verbose
security:
name: Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Run security audit
run: cargo audit
msrv:
name: Minimum Supported Rust Version
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Check if project builds with MSRV
run: cargo check --verbose