From ad70a53c75229b2392448a8c69ffb316832b1898 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 28 Sep 2025 20:02:23 +0300 Subject: [PATCH] ci: add ci --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml 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