Merge pull request #56 from AikidoSec/code-coverage #313
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust Unit Tests | |
on: | |
workflow_call: {} | |
push: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
run: | | |
rustup toolchain install stable | |
rustup default stable | |
rustup component add llvm-tools-preview | |
- name: Install code coverage tool | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Run tests | |
run: cargo llvm-cov | |
- name: Generate coverage report | |
run: cargo llvm-cov report --lcov --output-path target/lcov.info | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
files: ./target/lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} |