coverage guided testing with hegel #313
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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: read | |
| checks: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1 | |
| with: | |
| toolchain: stable | |
| components: clippy, rustfmt | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| token: ${{secrets.GITHUB_TOKEN}} | |
| - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2 | |
| - uses: astral-sh/setup-uv@e06108dd0aef18192324c70427afc47652e63a82 # v7.5.0 | |
| - name: Install Hegel server | |
| run: | | |
| uv venv .hegel-server | |
| uv pip install --python .hegel-server/bin/python \ | |
| 'hegel @ git+https://github.com/hegeldev/hegel-core@5d9c0f134d3f868274d95c52118a3b414a411859' | |
| echo "HEGEL_SERVER_COMMAND=$GITHUB_WORKSPACE/.hegel-server/bin/hegel" >> "$GITHUB_ENV" | |
| - name: Install Nextest | |
| run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /usr/local/bin | |
| - name: Cargo fmt | |
| run: cargo fmt --check | |
| - name: Build | |
| run: cargo build | |
| - name: Test | |
| run: cargo nextest run --benches | |
| - name: Clippy | |
| uses: auguwu/clippy-action@94a9ff2f6920180b89e5c03d121d0af04a9d3e03 # 1.4.0 | |
| with: | |
| token: ${{secrets.GITHUB_TOKEN}} | |
| - name: Cargo doctests | |
| run: cargo test --doc |