diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..b6e33c47f --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,29 @@ +name: Coverage + +on: + push: + branches: ["main"] + pull_request: + branches: ["**"] + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Rust toolchain (nightly) + run: rustup toolchain install nightly --component llvm-tools-preview + + - name: Install cargo-llvm-cov + run: cargo install cargo-llvm-cov + + - name: Run coverage + run: cargo llvm-cov --report-html --lcov --output-path=coverage + + - name: Upload coverage report + uses: actions/upload-artifact@v3 + with: + name: coverage-report + path: coverage/ \ No newline at end of file