mirror of
https://github.com/kristoferssolo/filecaster.git
synced 2025-10-21 19:00:34 +00:00
ci: update CI workflows
This commit is contained in:
parent
e20000513a
commit
6f60d8f5f1
125
.github/workflows/ci.yml
vendored
125
.github/workflows/ci.yml
vendored
@ -9,112 +9,31 @@ env:
|
||||
RUSTFLAGS: --deny warnings
|
||||
RUSTDOCFLAGS: --deny warnings
|
||||
jobs:
|
||||
# Run tests
|
||||
test:
|
||||
name: Tests
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --no-install-recommends \
|
||||
libasound2-dev libudev-dev libwayland-dev \
|
||||
libxkbcommon-dev
|
||||
- name: Populate target directory from cache
|
||||
uses: Leafwing-Studios/cargo-cache@v2
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
sweep-cache: true
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-actions@0.0.9
|
||||
- name: Install cargo-nextest
|
||||
run: cargo install cargo-nextest --locked
|
||||
- name: Run tests with nextest
|
||||
uses: taiki-e/install-action@cargo-nextest
|
||||
- name: Run Clippy
|
||||
run: cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
|
||||
- name: Run formatting
|
||||
run: cargo fmt --all --check
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cargo nextest run \
|
||||
--all-features \
|
||||
--all-targets
|
||||
# Workaround for https://github.com/rust-lang/cargo/issues/6669
|
||||
cargo test \
|
||||
--locked \
|
||||
--workspace \
|
||||
--all-features \
|
||||
--doc
|
||||
# Run clippy lints
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --no-install-recommends \
|
||||
libasound2-dev libudev-dev libwayland-dev \
|
||||
libxkbcommon-dev
|
||||
- name: Populate target directory from cache
|
||||
uses: Leafwing-Studios/cargo-cache@v2
|
||||
with:
|
||||
sweep-cache: true
|
||||
- name: Run clippy lints
|
||||
run: |
|
||||
cargo clippy \
|
||||
--locked \
|
||||
--workspace \
|
||||
--all-features \
|
||||
-- \
|
||||
--deny warnings
|
||||
# Check formatting
|
||||
format:
|
||||
name: Format
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt
|
||||
- name: Run cargo fmt
|
||||
run: |
|
||||
cargo fmt \
|
||||
--all \
|
||||
-- \
|
||||
--check
|
||||
# Check documentation
|
||||
doc:
|
||||
name: Docs
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --no-install-recommends \
|
||||
libasound2-dev libudev-dev libwayland-dev \
|
||||
libxkbcommon-dev
|
||||
- name: Populate target directory from cache
|
||||
uses: Leafwing-Studios/cargo-cache@v2
|
||||
with:
|
||||
sweep-cache: true
|
||||
- name: Check documentation
|
||||
run: |
|
||||
cargo doc \
|
||||
--locked \
|
||||
--workspace \
|
||||
--all-features \
|
||||
--document-private-items \
|
||||
--no-deps
|
||||
cargo nextest run --all-features --all-targets
|
||||
cargo test --locked --workspace --all-features --doc
|
||||
- name: Check Documentation
|
||||
run: cargo doc --locked --workspace --all-features --document-private-items --no-deps
|
||||
|
||||
Loading…
Reference in New Issue
Block a user