feat(shadictl): add git snapshot artifacts #41
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: Publish Project Coverage to Codecov | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| env: | |
| PYO3_PYTHON: python | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Linux dependencies | |
| run: sudo apt-get update && sudo apt-get install -y pkg-config nettle-dev | |
| - name: Restore Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: true | |
| - name: Install LLVM tools | |
| run: rustup component add llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-llvm-cov | |
| - name: Generate coverage report | |
| run: | | |
| mkdir -p coverage | |
| cargo llvm-cov --workspace --features coverage --lcov \ | |
| --output-path coverage/lcov.info \ | |
| --ignore-filename-regex "/rustc-[^/]+/" | |
| - name: Upload combined coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage/lcov.info | |
| flags: rust | |
| name: rust-coverage | |
| fail_ci_if_error: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |