okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
b749503db
main
1name : Config snapshot 2 3# tests/snapshot: what `strata launch`, the app's plain Load and the app's Models-screen Load hand the engine (arguments, environment, drafter, 4# confidence), for every simulated machine class and model set, against the golden files in tests/snapshot/golden. Nothing is loaded, 5# downloaded or run on a GPU. Windows and Linux must give byte-identical output, so both run. A change that moves what users 6# get has to update the golden files in the same commit (STRATA_SNAPSHOT_UPDATE=1 python -m pytest tests/snapshot, see tests/snapshot/README.md). 7 8on : 9push : 10branches : [ main ] 11paths : 12- .github/workflows/snapshot.yml 13- tests/snapshot/** 14- serve/** 15- strata_cli/** 16- strata_control/** 17- setup.py 18- strata.py 19- requirements*.txt 20- apps/host/server/** 21- apps/host/package*.json 22- packaging/** 23- tools/check 24pull_request : 25paths : 26- .github/workflows/snapshot.yml 27- tests/snapshot/** 28- serve/** 29- strata_cli/** 30- strata_control/** 31- setup.py 32- strata.py 33- requirements*.txt 34- apps/host/server/** 35- apps/host/package*.json 36- packaging/** 37- tools/check 38workflow_dispatch : 39 40permissions : 41contents : read 42 43concurrency : 44group : snapshot-${{ github.ref }} 45cancel-in-progress : true 46 47jobs : 48snapshot : 49name : ${{ matrix.os }} 50runs-on : ${{ matrix.os }} 51timeout-minutes : 45 52strategy : 53fail-fast : false 54matrix : 55os : [ ubuntu-24.04 , windows-2022 ] 56# GitHub's Windows runner runs this suite about 5x slower than a desktop PC (many small files and Node starts): since 0.2.14 (51 tests, 57# about 1,000 simulated launches) it reached test 43-45 of 51 in tools/check's 900 s (runs 43742804362, 43754922177), while the owner PC 58# runs all 51 in 3m20s and Linux CI in 4m25s. Twice the step's time there; Linux keeps 900 s. 59include : 60- os : ubuntu-24.04 61timeout_scale : 1 62- os : windows-2022 63timeout_scale : 2 64steps : 65- uses : actions/checkout@v4 66with : 67persist-credentials : false 68- uses : actions/setup-python@v5 69with : 70python-version : '3.12' 71cache : pip 72cache-dependency-path : requirements*.txt 73- uses : actions/setup-node@v4 74with : 75node-version : '24' 76cache : npm 77cache-dependency-path : apps/host/package-lock.json 78- name : Python packages 79run : python -m pip install -r requirements.txt -r requirements-dev.txt 80- name : Host packages (the app's Load runs in Node) 81working-directory : apps/host 82run : npm ci --no-audit --no-fund 83- name : tools/check snapshot 84run : python tools/check --only snapshot --keep --scratch "${{ runner.temp }}/check" --timeout-scale ${{ matrix.timeout_scale }} 85- name : Logs 86if : ${{ failure() }} 87uses : actions/upload-artifact@v4 88with : 89name : snapshot-${{ matrix.os }} 90path : ${{ runner.temp }}/check/*.log 91retention-days : 7