2022-02-04 18:29:55 +01:00
|
|
|
name: Lint, Build, Test
|
2021-07-31 23:10:07 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-06-23 19:46:55 +02:00
|
|
|
branches: [master, main]
|
2021-07-31 23:10:07 +02:00
|
|
|
pull_request:
|
2023-06-23 19:46:55 +02:00
|
|
|
branches: [master, main]
|
2021-07-31 23:10:07 +02:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-06-23 19:46:55 +02:00
|
|
|
- run: rustup component add clippy rustfmt
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Rust Cache
|
|
|
|
uses: Swatinem/rust-cache@v2.2.1
|
|
|
|
- name: Check format
|
|
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Check
|
|
|
|
run: cargo check --verbose --all-targets --all-features
|
|
|
|
- name: Clippy
|
|
|
|
run: cargo clippy --workspace --no-deps --all-features --all-targets -- -D warnings
|
|
|
|
- name: Validate documentation
|
|
|
|
run: cargo doc --workspace --no-deps --all-features
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|