Repository navigation
Shrink the docs logo SVG #512
This file contains hidden or 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: Compute coverage | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| # Cancel superseded runs on the same ref instead of queueing them. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install R | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: '4.4' | |
| - name: Install Rust | |
| run: rustup update stable | |
| - name: Cache Rust build | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Set R library path | |
| run: echo "LD_LIBRARY_PATH=$(R RHOME)/lib" >> "$GITHUB_ENV" | |
| - name: Generate code coverage | |
| run: > | |
| cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
| --ignore-filename-regex '(gtars-wasm/src|gtars-r/src/rust|gtars-cli/src|gtars-python/src)' | |
| - name: Upload coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info | |
| fail_ci_if_error: false |