gupaxx/.github/workflows/rust.yml

54 lines
1 KiB
YAML
Raw Normal View History

name: Rust
on:
push:
2024-06-11 19:50:26 +00:00
branches: [ "main", "dev" ]
paths-ignore:
- '**/*.md'
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: ubuntu-latest
2024-06-07 08:57:46 +00:00
steps:
2024-06-07 09:05:05 +00:00
- uses: actions/checkout@v4
- name: Test
run: cargo test
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: ubuntu-latest
2024-06-07 09:05:05 +00:00
steps:
- uses: actions/checkout@v4
- name: Documentation
2024-06-07 09:37:32 +00:00
run: cargo doc --no-deps