Scheduled App Tests workflow (RJNY/Obtainium-Emulation-Pack)
The Scheduled App Tests workflow from RJNY/Obtainium-Emulation-Pack, explained and optimized by Latchkey.
CI health: C - fair
Point runs-on at Latchkey and get caching, job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Scheduled App Tests workflow from the RJNY/Obtainium-Emulation-Pack repository, a real project running GitHub Actions. It is shown here with attribution under its Unlicense license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: Scheduled App Tests
on:
schedule:
- cron: "0 11 * * *" # Daily at ~6 AM Central (11:00 UTC)
workflow_dispatch:
permissions:
issues: write
jobs:
test:
name: Live Test All Apps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Run tests
id: test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/test-apps.py --json > test-results.json 2>/dev/null || true
cat test-results.json
- name: Process results and manage issues
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/process-test-results.py \
test-results.json \
--run-url "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- name: Fail if any tests failed
run: |
python -c "
import json, sys
with open('test-results.json') as f:
data = json.load(f)
failed = data.get('summary', {}).get('failed', 0)
if failed > 0:
print(f'{failed} app(s) failed')
sys.exit(1)
print('All apps passed')
"
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: Scheduled App Tests on: schedule: - cron: "0 11 * * *" # Daily at ~6 AM Central (11:00 UTC) workflow_dispatch: permissions: issues: write jobs: test: timeout-minutes: 30 name: Live Test All Apps runs-on: latchkey-small steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: cache: 'pip' python-version: "3.11" - name: Run tests id: test env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | python scripts/test-apps.py --json > test-results.json 2>/dev/null || true cat test-results.json - name: Process results and manage issues env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | python scripts/process-test-results.py \ test-results.json \ --run-url "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - name: Fail if any tests failed run: | python -c " import json, sys with open('test-results.json') as f: data = json.load(f) failed = data.get('summary', {}).get('failed', 0) if failed > 0: print(f'{failed} app(s) failed') sys.exit(1) print('All apps passed') "
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - 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.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.