chore: update version to 0.1.14 #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Golden baseline | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| authoritative-golden: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.17.1" | |
| cache: npm | |
| cache-dependency-path: tools/golden_compare/package-lock.json | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12.10" | |
| cache: pip | |
| cache-dependency-path: tools/golden_compare/requirements.txt | |
| - uses: dtolnay/rust-toolchain@1.95.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Install fixed comparator and reference dependencies | |
| run: | | |
| python3 -m pip install -r tools/golden_compare/requirements.txt | |
| npm ci --prefix tools/golden_compare | |
| - name: Test authoritative comparator | |
| run: python3 -m unittest discover -s tools/golden_compare/tests -v | |
| - name: Regenerate RaTeX output and KaTeX 0.16.45 references | |
| run: | | |
| ./scripts/update_golden_output.sh --png-only | |
| node tools/golden_compare/generate_reference.mjs | |
| - name: Read the trusted baseline from the target commit | |
| env: | |
| BASELINE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} | |
| run: | | |
| git fetch --no-tags --depth=1 origin "$BASELINE_SHA" | |
| if git show "${BASELINE_SHA}:tests/golden/baseline.json" \ | |
| > "$RUNNER_TEMP/golden-baseline.json"; then | |
| git show "${BASELINE_SHA}:tests/golden/test_cases.txt" \ | |
| > "$RUNNER_TEMP/golden-baseline-cases.txt" | |
| echo "Using baseline from $BASELINE_SHA" | |
| else | |
| rm -f "$RUNNER_TEMP/golden-baseline.json" | |
| echo "::notice::The target commit has no compact golden baseline; running absolute gates only." | |
| fi | |
| - name: Score with the authoritative Python comparator | |
| run: | | |
| mkdir -p artifacts/golden | |
| baseline_args=() | |
| if [[ -f "$RUNNER_TEMP/golden-baseline.json" ]]; then | |
| baseline_args=( | |
| --baseline-report "$RUNNER_TEMP/golden-baseline.json" | |
| --baseline-formulas "$RUNNER_TEMP/golden-baseline-cases.txt" | |
| --max-case-regression 0.05 | |
| ) | |
| fi | |
| python3 tools/golden_compare/compare_golden.py \ | |
| --json-out artifacts/golden/main.json \ | |
| --baseline-out artifacts/golden/baseline.json \ | |
| --require-manifests \ | |
| --fail-on-missing \ | |
| --min-coverage 1.0 \ | |
| --min-mean 0.85 \ | |
| "${baseline_args[@]}" | |
| - name: Upload machine-readable golden report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: golden-report | |
| path: artifacts/golden/ |