2022-02-23 20:29:25 -08:00
|
|
|
name: CI checks
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
steps:
|
2023-02-16 09:28:54 -08:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-23 20:29:25 -08:00
|
|
|
- name: Run tests
|
2023-02-16 10:02:47 -08:00
|
|
|
run: cargo test --all-features --verbose --workspace
|
2023-02-16 09:28:54 -08:00
|
|
|
- name: Verify working directory is clean
|
|
|
|
run: git diff --exit-code
|
2022-02-23 20:29:25 -08:00
|
|
|
|
|
|
|
bitrot:
|
|
|
|
name: Bitrot check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-16 09:28:54 -08:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-23 20:29:25 -08:00
|
|
|
# Build benchmarks to prevent bitrot
|
|
|
|
- name: Build benchmarks
|
2023-01-13 07:40:57 -08:00
|
|
|
run: cargo build --workspace --benches --all-features
|
2022-02-23 20:29:25 -08:00
|
|
|
|
|
|
|
doc-links:
|
|
|
|
name: Intra-doc links
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-16 09:28:54 -08:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: cargo fetch
|
|
|
|
# Requires #![deny(rustdoc::broken_intra_doc_links)] in crates.
|
2022-02-23 20:29:25 -08:00
|
|
|
- name: Check intra-doc links
|
2023-02-16 10:02:47 -08:00
|
|
|
run: cargo doc --workspace --document-private-items
|
2022-02-23 20:29:25 -08:00
|
|
|
|
|
|
|
fmt:
|
|
|
|
name: Rustfmt
|
|
|
|
timeout-minutes: 30
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-16 09:28:54 -08:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Check formatting
|
|
|
|
run: cargo fmt --all -- --check
|