From bba1db7e2fc1b7bad3c44da8115f862d16211759 Mon Sep 17 00:00:00 2001 From: Patrick Marie Date: Mon, 3 Feb 2025 22:20:54 +0100 Subject: [PATCH] feat: adding basic CI checks --- .github/workflows/check.yaml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/check.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..9efc1fd --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,40 @@ +name: CI checks + +on: + push: + branches: + - main + pull_request: + branches: + - main + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - uses: Swatinem/rust-cache@v2 + + - name: Clippy check + run: cargo clippy -- -D warnings + + format: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + + - name: Check formatting + run: cargo fmt --check