2024-06-07 08:52:32 +00:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
- name: Format
|
|
|
|
run: cargo fmt --all --check
|
2024-06-07 08:57:46 +00:00
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, ubuntu-latest]
|
|
|
|
steps:
|
2024-06-07 09:05:05 +00:00
|
|
|
- uses: actions/checkout@v4
|
2024-06-07 08:52:32 +00:00
|
|
|
- name: Test
|
2024-06-07 08:57:46 +00:00
|
|
|
run: cargo test --all-features
|
2024-06-07 08:52:32 +00:00
|
|
|
typo:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Spell Check
|
|
|
|
uses: crate-ci/typos@master
|
2024-06-07 09:05:05 +00:00
|
|
|
clippy:
|
2024-06-07 08:52:32 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, ubuntu-latest]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Clippy (fail on warnings)
|
2024-06-07 09:05:05 +00:00
|
|
|
run: cargo clippy --all-features -- -D warnings
|
|
|
|
check:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, ubuntu-latest]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-06-07 08:52:32 +00:00
|
|
|
- name: Check compilation
|
|
|
|
run: cargo check --all-features --verbose
|
2024-06-07 09:05:05 +00:00
|
|
|
doc:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, ubuntu-latest]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-06-07 08:52:32 +00:00
|
|
|
- name: Documentation
|
2024-06-07 09:05:05 +00:00
|
|
|
run: cargo doc --all-features --no-deps
|