| 1 | name: Windows focus |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | inputs: |
| 6 | expected_sha: |
| 7 | description: Exact 40-character commit selected by --ref |
| 8 | required: true |
| 9 | type: string |
| 10 | filter: |
| 11 | description: nextest expression, for example 'test(compaction_lock) | test(persistence_actor)' |
| 12 | required: true |
| 13 | default: all() |
| 14 | type: string |
| 15 | |
| 16 | permissions: |
| 17 | contents: read |
| 18 | |
| 19 | jobs: |
| 20 | focused: |
| 21 | name: Focused tests (windows-latest) |
| 22 | runs-on: windows-latest |
| 23 | timeout-minutes: 90 |
| 24 | env: |
| 25 | CARGO_TERM_COLOR: always |
| 26 | CARGO_INCREMENTAL: 0 |
| 27 | RUSTFLAGS: -Dwarnings |
| 28 | RUST_MIN_STACK: 8388608 |
| 29 | RUST_BACKTRACE: full |
| 30 | FILTER: ${{ inputs.filter }} |
| 31 | steps: |
| 32 | - uses: actions/checkout@v7 |
| 33 | with: |
| 34 | fetch-depth: 1 |
| 35 | - name: Verify exact commit SHA |
| 36 | shell: bash |
| 37 | env: |
| 38 | EXPECTED_SHA: ${{ inputs.expected_sha }} |
| 39 | run: | |
| 40 | set -euo pipefail |
| 41 | if [[ "${#EXPECTED_SHA}" -ne 40 || "${EXPECTED_SHA}" =~ [^0-9a-fA-F] ]]; then |
| 42 | echo "::error::expected_sha must be a full 40-character commit SHA." >&2 |
| 43 | exit 1 |
| 44 | fi |
| 45 | actual="$(git rev-parse HEAD)" |
| 46 | expected_normalized="$(printf '%s' "${EXPECTED_SHA}" | tr '[:upper:]' '[:lower:]')" |
| 47 | if [[ "${actual}" != "${expected_normalized}" ]]; then |
| 48 | echo "::error::Dispatch resolved to ${actual}, not requested ${EXPECTED_SHA}." >&2 |
| 49 | exit 1 |
| 50 | fi |
| 51 | - uses: dtolnay/rust-toolchain@1.100.0 |
| 52 | - uses: taiki-e/install-action@b6620ca104fb7b50dafa1109be9622abc1fdd381 |
| 53 | with: |
| 54 | tool: cargo-nextest@0.9.151 |
| 55 | - name: Run focused tests |
| 56 | shell: bash |
| 57 | run: cargo nextest run -p codewhale-engine -p codewhale-plugins -p codewhale-tui -p codewhale-app-server --lib --locked --profile ci -E "$FILTER" |
| 58 |