coverage #37
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: | |
| workflow_run: | |
| workflows: | |
| - build | |
| branches: | |
| - main | |
| types: | |
| - completed | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| # Cache cargo registry, index, and build directories | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo | |
| key: cargo-${{ hashFiles('**/Cargo.toml') }} | |
| - name: setup | |
| run: | | |
| sudo apt update | |
| sudo apt install libfontconfig1-dev pkg-config | |
| - name: install tarpaulin | |
| run: cargo install cargo-tarpaulin | |
| - name: coverage | |
| run: cargo tarpaulin --engine llvm --follow-exec --post-test-delay 10 --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} |