mirror of
https://github.com/FeitianTech/FidoSoftwareAuthenticator.git
synced 2026-08-28 10:42:28 -07:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
fmt:
|
|
name: cargo fmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
- run: cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
name: cargo clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libudev-dev libclang-dev
|
|
- uses: Swatinem/rust-cache@v2
|
|
# Warnings are surfaced but not treated as errors yet; existing
|
|
# transport-core code triggers a number of clippy nits that will be
|
|
# cleaned up in follow-up commits.
|
|
- run: cargo clippy --workspace --all-targets
|
|
|
|
test:
|
|
name: cargo test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libudev-dev libclang-dev
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: cargo test --workspace
|