binf/.github/workflows/ci-tests.yml

59 lines
1.2 KiB
YAML
Raw Normal View History

2023-11-03 20:02:21 +01:00
name: Rust
on:
push:
2023-12-29 22:51:06 +01:00
branches:
- "main"
- "feat/*"
2023-11-03 20:02:21 +01:00
pull_request:
2023-12-29 22:51:06 +01:00
branches:
- "main"
- "feat/*"
2023-11-03 20:02:21 +01:00
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run tests
run: cargo test --verbose --all-features --workspace --tests --bins --lib
- name: Run doctests
run: cargo test --verbose --all-features --workspace --doc
2023-12-29 22:51:06 +01:00
clippy_check:
name: Clippy
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Run clippy
run: cargo clippy -- -D warnings
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check