feat: ci enhancements (#12) #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust CI | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
pull_request: | |
branches: [ "main", "dev", "feat/*", "fix/*", "doc/*" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Run rustfmt | |
run: cargo fmt --all -- --check | |
- name: Run linter | |
run: cargo clippy --all-targets --all -- -D warnings | |
- name: Build project | |
run: cargo build --verbose | |
- name: Tests | |
run: cargo nextest --all | |
- name: Doctests | |
run: cargo test --doc | |
- name: Generate documentation | |
run: cargo doc --no-deps --document-private-items |