Skip to content

Commit

Permalink
Merge pull request #1090 from neon-bindings/kv/code-coverage
Browse files Browse the repository at this point in the history
test(neon): Upload code coverage
  • Loading branch information
kjvalencik authored Jan 31, 2025
2 parents 065ba2d + 0893806 commit 7f4feb1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ jobs:
key: ${{ runner.os }}-electron-${{ hashFiles('./package-lock.json') }}
path: ~/Library/Caches/electron

- name: Install cargo-llvm-cov
if: matrix.os == 'ubuntu-latest' && matrix.rust-toolchain == 'stable'
uses: taiki-e/install-action@cargo-llvm-cov

- name: Set coverage environment variables
if: matrix.os == 'ubuntu-latest' && matrix.rust-toolchain == 'stable'
run: cargo llvm-cov show-env | tr -d "'" >> $GITHUB_ENV

- name: npm install
run: npm ci --prefer-offline --no-audit --no-fund

Expand All @@ -106,3 +114,15 @@ jobs:
- name: Test
if: matrix.os != 'ubuntu-latest'
run: npm test

- name: Generate coverage report
if: matrix.os == 'ubuntu-latest' && matrix.rust-toolchain == 'stable'
run: cargo llvm-cov report --ignore-filename-regex test --codecov --output-path target/codecov.json

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.rust-toolchain == 'stable'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: neon-bindings/neon
files: target/codecov.json

0 comments on commit 7f4feb1

Please sign in to comment.