diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..abe91a1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 071b295..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -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 diff --git a/Cargo.toml b/Cargo.toml index ed0a21b..fbc5fe5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,4 +28,4 @@ url = "2.5" [lints.clippy] pedantic = "warn" nursery = "warn" -unwrap_used = "warn" +# unwrap_used = "warn" // ignore for now diff --git a/src/tui.rs b/src/tui.rs index b55d4b1..23d368c 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -58,8 +58,8 @@ impl Tui { /// [`Draw`] the terminal interface by [`rendering`] the widgets. /// - /// [`Draw`]: tui::Terminal::draw - /// [`rendering`]: crate::ui:render + /// [`Draw`]: crate::tui::Terminal::draw + /// [`rendering`]: crate::ui::render /// /// # Errors ///