ci updates #164
Workflow file for this run
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 | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: '-D warnings' | |
jobs: | |
test: | |
name: Test | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run tests | |
run: cargo test | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Run rustfmt | |
run: cargo fmt --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run clippy | |
run: cargo clippy --all-targets --all-features | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install tarpaulin | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: cargo-tarpaulin | |
version: "^0.28" | |
- name: Run tarpaulin | |
run: cargo tarpaulin --skip-clean --out xml -e trakt-macros --workspace | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: ansg191/trakt | |
cargo-deny: | |
name: Cargo-Deny | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: EmbarkStudios/cargo-deny-action@v1 |