From fd1872ca1ccd79d039592cccdf6c0abc72b44a56 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Tue, 7 Nov 2023 23:25:30 +0100 Subject: [PATCH] feat: workflow with several checks --- .github/workflows/checks.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..9984c66 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,31 @@ +name: Checks + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + + - name: Install cargo-audit + run: cargo install cargo-audit + + - name: Format code with rustfmt + run: cargo fmt --all -- --check + + - name: Lint code with clippy + run: cargo clippy --all -- --deny warnings + + - name: Check for known vulnerabilities with cargo-audit + run: cargo audit + + - name: Build project + run: cargo build --all --release + + - name: Run tests + run: cargo test --all