From 3284f2d96edd969f1c2c8003152925a2e18bed65 Mon Sep 17 00:00:00 2001 From: Chris Saunders Date: Mon, 27 Jan 2025 22:25:53 -0800 Subject: [PATCH] Add ci workflow --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 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..4abca92 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +# CI workflow runs all source quality tests. It does not build the release binary. +# +name: CI + +on: + push: + branches: [ main, actions_test ] + pull_request: + branches: [ main ] + +jobs: + qc: + name: Source QC + + env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + + runs-on: ubuntu-22.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.84.0 + components: clippy, rustfmt + + - name: Check source formatting + run: cargo fmt --check + + - name: Build + run: cargo build --verbose + + - name: Test + run: cargo test --verbose + + - name: Clippy + run: cargo clippy --verbose -- -D warnings + + - name: Clippy on tests + run: cargo clippy --tests --verbose -- -D warnings