ci: update CI workflow
Some checks failed
CI / build-and-test (push) Has been cancelled

This commit is contained in:
Kristofers Solo 2025-09-25 11:07:22 +03:00
parent 161362fc1f
commit 7402d6ff1d
Signed by: kristoferssolo
GPG Key ID: 74FF8144483D82C8
4 changed files with 41 additions and 26 deletions

38
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --deny warnings
RUSTDOCFLAGS: --deny warnings
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Install cargo-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
cargo test --locked --workspace --all-features --doc
- name: Check Documentation
run: cargo doc --locked --workspace --all-features --document-private-items --no-deps

View File

@ -1,23 +0,0 @@
name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache
uses: swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt -- --check
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test
- name: Run clippy
run: cargo clippy -- -D warnings

View File

@ -28,4 +28,4 @@ url = "2.5"
[lints.clippy] [lints.clippy]
pedantic = "warn" pedantic = "warn"
nursery = "warn" nursery = "warn"
unwrap_used = "warn" # unwrap_used = "warn" // ignore for now

View File

@ -58,8 +58,8 @@ impl<B: Backend> Tui<B> {
/// [`Draw`] the terminal interface by [`rendering`] the widgets. /// [`Draw`] the terminal interface by [`rendering`] the widgets.
/// ///
/// [`Draw`]: tui::Terminal::draw /// [`Draw`]: crate::tui::Terminal::draw
/// [`rendering`]: crate::ui:render /// [`rendering`]: crate::ui::render
/// ///
/// # Errors /// # Errors
/// ///