steamguard-cli/.github/workflows/rust.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

2022-02-04 18:29:55 +01:00
name: Lint, Build, Test
2021-07-31 23:10:07 +02:00
on:
push:
branches: [master, main]
2021-07-31 23:10:07 +02:00
pull_request:
branches: [master, main]
2021-07-31 23:10:07 +02:00
env:
CARGO_TERM_COLOR: always
jobs:
test:
2021-07-31 23:10:07 +02:00
runs-on: ubuntu-latest
steps:
- run: rustup component add clippy rustfmt
- uses: actions/checkout@v3
- name: Rust Cache
2023-06-29 16:38:37 +02:00
uses: Swatinem/rust-cache@v2.5.0
- 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
check:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-musl, x86_64-pc-windows-gnu]
steps:
- uses: actions/checkout@v3
- name: Rust Cache
2023-06-29 16:38:37 +02:00
uses: Swatinem/rust-cache@v2.5.0
with:
prefix-key: v0-rust-${{ matrix.target }}
- name: Install Cross
uses: baptiste0928/cargo-install@v1
with:
crate: cross
- name: Check
run: cross check --verbose --all-targets --all-features --target ${{ matrix.target }}