diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1cb47c4..8d076f1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,8 @@ on: jobs: ci: runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 @@ -23,3 +25,16 @@ jobs: run: cargo check - name: Clippy run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used + - uses: taiki-e/install-action@v2 + with: + tool: cargo-llvm-cov + - name: Install llvm-tools-preview + run: rustup component add llvm-tools-preview + - name: Generate coverage + run: cargo llvm-cov --codecov --output-path codecov.json -- --skip scenario::test::empty + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + use_oidc: true + flags: unit-tests + files: codecov.json diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..450d292 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,20 @@ +coverage: + status: + project: + default: + target: auto + threshold: 1% + informational: true + patch: + default: + target: auto + threshold: 1% + informational: true + +flags: + unit-tests: + carryforward: true + +comment: + layout: "reach,diff,flags,files" + behavior: default