From 3cf3d837ae8720a0cbcd067f3a23cffb2467c0a5 Mon Sep 17 00:00:00 2001 From: Nikhil Sinha Date: Mon, 30 Dec 2024 23:08:44 -0500 Subject: [PATCH] fix: add test, fmt, clippy to workflow --- .github/workflows/coverage.yaml | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index eb5a46da4..3611cf861 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -11,6 +11,52 @@ on: name: Lint, Test and Coverage Report jobs: + unit-tests: + name: Unit tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + + fmt: + name: Rust fmt check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: Cargo Clippy check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings + coverage: runs-on: ubuntu-latest steps: