Files
poulpy/.github/workflows/ci.yml
2025-08-08 19:22:42 +02:00

63 lines
1.4 KiB
YAML

name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build-and-test:
name: Build & Test (stable, beta, nightly)
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable, beta, nightly]
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: actions/setup-rust@v1
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cargo fmt check
run: cargo fmt --all -- --check
- name: Build
run: cargo build --all-targets --verbose
- name: Run tests
run: cargo test --all-targets --verbose
- name: Run Clippy
run: cargo clippy --all-targets -- -D warnings
docs:
name: Check Documentation
runs-on: ubuntu-latest
needs: build-and-test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-rust@v1
with:
toolchain: stable
- name: Build docs
run: cargo doc --all --no-deps --verbose