fix(ci): commit Cargo.lock for reproducible builds (#1123) #732
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: Coverage | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| coverage: | |
| name: Code Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-tarpaulin | |
| uses: taiki-e/install-action@cargo-tarpaulin | |
| - name: Generate coverage report | |
| run: | | |
| cargo tarpaulin --features http_client \ | |
| --workspace \ | |
| --exclude bashkit-python \ | |
| --out xml \ | |
| --out html \ | |
| --output-dir coverage \ | |
| --exclude-files "crates/bashkit-bench/*" \ | |
| --exclude-files "crates/bashkit-cli/*" \ | |
| --exclude-files "crates/bashkit-python/*" \ | |
| --timeout 300 \ | |
| --skip-clean \ | |
| --engine llvm | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| files: coverage/cobertura.xml | |
| flags: unittests | |
| fail_ci_if_error: false | |
| verbose: true | |
| - name: Upload coverage artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 30 |