CI workflow (Palaiologos1453/OpenInterview)
The CI workflow from Palaiologos1453/OpenInterview, explained and optimized by Latchkey.
CI health: D - needs work
Run this on Latchkey for self-healing, caching, and up to 58% lower cost.
Grade your own workflow free or run it on Latchkey →What it does
This is the CI workflow from the Palaiologos1453/OpenInterview repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('apps/api/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install API
working-directory: apps/api
run: pip install -e ".[dev]"
- name: Lint API
run: python -m ruff check apps/api/openinterview_api apps/api/tests
- name: Run API tests
run: |
$env:PYTHONPATH = "$PWD\apps\api"
python -m unittest apps.api.tests.test_engine apps.api.tests.test_api
- name: Run scoring evaluation
run: python scripts/evaluate_scoring.py --output apps/api/eval/scoring-report.md --json-output apps/api/eval/scoring-report.json
- name: Check frontend syntax
run: node --check apps/web/app.js
- name: Check PowerShell scripts
shell: pwsh
run: |
$scripts = @(
"scripts/start-local.ps1",
"scripts/start-api.ps1",
"scripts/start-web.ps1",
"scripts/start-api-production.ps1"
)
foreach ($script in $scripts) {
$tokens = $null
$errors = $null
[System.Management.Automation.Language.Parser]::ParseFile((Resolve-Path $script), [ref]$tokens, [ref]$errors) | Out-Null
if ($errors.Count) {
$errors | ForEach-Object { Write-Error ("{0}: {1}" -f $script, $_.Message) }
exit 1
}
}
The same workflow, on Latchkey
Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.
name: CI on: push: pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: test: timeout-minutes: 30 runs-on: windows-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - uses: actions/setup-node@v4 with: cache: 'npm' node-version: "22" - name: Cache pip uses: actions/cache@v4 with: path: ~\AppData\Local\pip\Cache key: ${{ runner.os }}-pip-${{ hashFiles('apps/api/pyproject.toml') }} restore-keys: | ${{ runner.os }}-pip- - name: Install API working-directory: apps/api run: pip install -e ".[dev]" - name: Lint API run: python -m ruff check apps/api/openinterview_api apps/api/tests - name: Run API tests run: | $env:PYTHONPATH = "$PWD\apps\api" python -m unittest apps.api.tests.test_engine apps.api.tests.test_api - name: Run scoring evaluation run: python scripts/evaluate_scoring.py --output apps/api/eval/scoring-report.md --json-output apps/api/eval/scoring-report.json - name: Check frontend syntax run: node --check apps/web/app.js - name: Check PowerShell scripts shell: pwsh run: | $scripts = @( "scripts/start-local.ps1", "scripts/start-api.ps1", "scripts/start-web.ps1", "scripts/start-api-production.ps1" ) foreach ($script in $scripts) { $tokens = $null $errors = $null [System.Management.Automation.Language.Parser]::ParseFile((Resolve-Path $script), [ref]$tokens, [ref]$errors) | Out-Null if ($errors.Count) { $errors | ForEach-Object { Write-Error ("{0}: {1}" -f $script, $_.Message) } exit 1 } }
What changed
- Cancel superseded runs when a branch or PR gets a newer push.
- Cache dependency installs on the setup step so they are served from cache.
- Add a job timeout so a hung step cannot burn hours of runner time.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- Dependency installs
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.