lha #11
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
on: | |
push: | |
#branches: [main] | |
pull_request: | |
branches: | |
- main | |
name: Test coverage | |
jobs: | |
coverage: | |
name: Collect test coverage | |
runs-on: ubuntu-latest | |
env: | |
#RUSTFLAGS: -D warnings | |
CARGO_TERM_COLOR: always | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Git LFS Pull | |
run: git lfs pull | |
- name: Create LFS file list | |
run: git lfs ls-files --long | cut -d ' ' -f1 | sort > .lfs-assets-id | |
- name: LFS Cache | |
uses: actions/cache@v3 | |
with: | |
path: .git/lfs/objects | |
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }} | |
restore-keys: | | |
${{ runner.os }}-lfs- | |
- name: ls checkout | |
run: ls -lha tests/test-data | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: llvm-tools-preview | |
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2 | |
- name: Install latest nextest release | |
uses: taiki-e/install-action@af5d802f13195cc3a6becf3d19d72f7de93908d8 # v2 | |
with: | |
tool: nextest | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@af5d802f13195cc3a6becf3d19d72f7de93908d8 # v2 | |
with: | |
tool: cargo-llvm-cov | |
- name: Collect coverage data | |
run: | | |
cargo llvm-cov --no-report nextest | |
cargo llvm-cov report --lcov --output-path lcov.info | |
- name: Upload coverage data to codecov | |
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
AFF_TEST_DATA_PW: ${{ secrets.AFF_TEST_DATA_PW }} | |
with: | |
files: lcov.info |