gupaxx/.github/workflows/rust.yml

65 lines
1.3 KiB
YAML
Raw Normal View History

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
- name: Test
2024-06-07 09:37:32 +00:00
run: cargo test
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:
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:37:32 +00:00
run: cargo clippy -- -D warnings
2024-06-07 09:05:05 +00:00
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Check compilation
2024-06-07 09:37:32 +00:00
run: cargo check --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
- name: Documentation
2024-06-07 09:37:32 +00:00
run: cargo doc --no-deps