From af28560582340b3a9c3b8510493e5da4ae075a23 Mon Sep 17 00:00:00 2001 From: James Elgar Date: Mon, 26 Aug 2024 10:55:35 +0100 Subject: [PATCH] Add check ci --- .github/workflows/check.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..1379888 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,29 @@ +name: Build, Lint, Test + +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: Build + run: cargo build + + - name: Check formatting + run: cargo fmt --all -- --check + + - name: Clippy + run: cargo clippy --all -- -D warnings + + - name: Run tests + run: cargo test