Files
orca/.github/workflows/unit-selection-evidence.yml
T
8c78f82369 ci: bound every job in pull-request workflows with timeout-minutes (#28784)
* Bound every pull request CI job with timeout-minutes

* ci: bound the PR-triggered jobs added since #28784 with timeout-minutes

Sized from recent run times: containers 1.2 min max, mac-native-owner-smoke 5.5,
contract 1.2. Secret scan (1.8 max) and mobile_web_app (5.4 max) get roomier limits.

* ci: check PR job time limits in code_paths so workflow-only PRs are covered

A PR that changes only mobile.yml or cloud-verify.yml skips the root unit
shards, so the timeout test never ran for it. Run the check from code_paths,
which runs on every PR, as check-required-pr-context already does.

* ci: use a uniform 3h ceiling on newly bounded PR jobs to stop runaway jobs

The goal is only to stop jobs that would otherwise run to GitHub's 6h
default, not to tune per-job limits. The guard keeps requiring a limit
below 360 minutes on every PR job but no longer enforces a lower value.

---------

Co-authored-by: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com>
Co-authored-by: Neil <neil@stably.ai>
2026-11-05 19:59:47 -08:00

66 lines
2.4 KiB
YAML

name: Unit selection evidence
# Call advisory evidence beside unit-tests, preserving artifacts without delaying verify ~36s after shards; job/comparison remain continue-on-error.
on:
workflow_call:
inputs:
rebuild_plan:
description: Rebuild shadow selection from the tested source outside the required gate.
default: false
type: boolean
permissions:
contents: read
jobs:
selection_evidence:
if: ${{ !cancelled() }}
continue-on-error: true
runs-on: ${{ inputs.rebuild_plan && 'ubuntu-24.04' || 'ubuntu-slim' }}
timeout-minutes: 180
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
sparse-checkout: ${{ !inputs.rebuild_plan && '/config/scripts/ci/unit-selection/ci-unit-selection-review.mjs' || '' }}
sparse-checkout-cone-mode: false
persist-credentials: false
- uses: ./.github/actions/install-node-dependencies
if: inputs.rebuild_plan
- name: Rebuild shadow selection
if: inputs.rebuild_plan
env:
ORCA_UNIT_SELECTION_MODE: shadow
ORCA_PULL_REQUEST_DRAFT: ${{ github.event.pull_request.draft }}
ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '12' }}
run: node config/scripts/ci/unit-selection/ci-unit-plan.mjs
- uses: actions/download-artifact@v8
with:
pattern: unit-shard-node-*-attempt-${{ github.run_attempt }}
path: unit-evidence/
- name: Compare selection with full results
continue-on-error: true
uses: actions/github-script@v8
env:
REBUILD_SELECTION_PLAN: ${{ inputs.rebuild_plan }}
with:
github-token: unused
script: |
const env = { ...process.env }
delete env['INPUT_GITHUB-TOKEN']
const args = [
'config/scripts/ci/unit-selection/ci-unit-selection-review.mjs',
'unit-evidence'
]
if (env.REBUILD_SELECTION_PLAN === 'true') args.push('ci-shards/unit-selection.json')
await exec.exec(process.execPath, args, { env })
- uses: actions/upload-artifact@v7
if: always()
continue-on-error: true
with:
name: unit-selection-review-attempt-${{ github.run_attempt }}
path: |
unit-evidence/selection-review.json
ci-shards/unit-selection.json
retention-days: 30