diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index d792cd9..cd25bc8 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -18,6 +18,8 @@ jobs: - uses: actions/checkout@v3 - name: Install prerequisites run: sudo apt-get -y install libsdl2-dev + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov - name: Fetch submodules run: git submodule update --init --recursive - name: Checkout souper_tests @@ -30,3 +32,12 @@ jobs: run: cargo build --verbose --release - name: Run tests run: cargo test --verbose + - name: Generate code coverage + run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: codecov.json + fail_ci_if_error: true +