perf: optimize sampling for grep mode in jsonl files #1642
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 ] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| coverage: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Set up Rust toolchain | |
| uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable | |
| with: | |
| toolchain: stable | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@81a2f66614862089b24532663f669a485d79c889 # v2 | |
| with: | |
| tool: cargo-llvm-cov | |
| - name: Generate Codecov JSON | |
| run: | | |
| cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json | |
| - name: Generate HTML report (no re-run) | |
| run: | | |
| cargo llvm-cov --all-features --workspace --no-run --html | |
| - name: Upload to Codecov | |
| if: ${{ github.event.pull_request.head.repo.fork == false || github.event_name == 'push' }} | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: codecov.json | |
| flags: rust | |
| fail_ci_if_error: true | |
| verbose: true | |
| - name: Upload HTML report | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| name: coverage-html | |
| path: target/llvm-cov/html | |
| - name: Upload lcov.info | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| name: lcov.info | |
| path: lcov.info |