Merge pull request #24 from JMTamayo/main #24
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: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
LOG_LEVEL: debug | |
CARGO_TERM_COLOR: always | |
MIN_LINE_COVERAGE_TARGET: 80 | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt, clippy | |
- name: Format | |
run: cargo fmt --all --check | |
- name: Lints | |
run: cargo clippy --workspace --all-features | |
- name: Build | |
run: cargo build --workspace --all-features | |
Documentation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Build Crate Doc | |
run: cargo doc --workspace --all-features --document-private-items --verbose | |
- name: Doc Tests | |
run: cargo test --workspace --all-features --doc | |
Tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Repository | |
uses: actions/checkout@v4 | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/[email protected] | |
with: | |
tool: cargo-llvm-cov | |
- name: Unit & Integration Tests | |
run: cargo llvm-cov --workspace --all-features --show-missing-lines --summary-only --fail-under-lines ${{ env.MIN_LINE_COVERAGE_TARGET }} | |
Security: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Repository | |
uses: actions/checkout@v4 | |
- name: Security Analysis | |
uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
log-level: ${{ env.LOG_LEVEL }} | |
command: check |