From bd0879376912a63d5c94eec85975965e88274913 Mon Sep 17 00:00:00 2001 From: Adam Cimarosti Date: Mon, 29 Jan 2024 10:32:17 +0000 Subject: [PATCH] chore: CI --- .github/workflows/ci.yaml | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..58fe1a7 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,54 @@ +name: Rust CI + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + + - name: Test with coverage + uses: actions-rs/cargo@v1 + with: + command: tarpaulin + args: --out Html + + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: Check linting + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-targets --all-features -- -D warnings + + - name: Upload coverage report + uses: actions/upload-artifact@v3 + with: + name: tarpaulin_report + path: tarpaulin-report.html +