lawsynth/.github/workflows/nightly-science.yml
caelum0x c44ed79ea2 feat(ci): add release-build workflow and fix nightly-science test collection
- release-build.yml: new workflow_dispatch-independent job triggered on v*
  tags, building the lawsynth CLI on a macos-latest/ubuntu-latest matrix
  (same cargo build --release --locked -p lawsynth-cli command release.yml's
  verification job already runs) and uploading the packaged binaries as
  GitHub Release assets via softprops/action-gh-release. Does not modify
  release.yml, which stays verify-only and workflow_dispatch-triggered.
- nightly-science.yml: was running `pytest tests/scientific tests/conformance`
  directly, which collects zero tests (exit code 5) because those directories
  hold declarative run.py fixtures, not test_*.py files. Added a Rust
  toolchain + CLI build step and a new tests/test_scientific.py pytest
  wrapper (mirroring the existing tests/test_conformance.py pattern) that
  parametrizes one test per case and runs each case's own run.py via
  runpy.run_path against the native engine, then pointed the job at the two
  real wrapper modules.

Verified locally: cargo fmt --check, cargo clippy --workspace --all-targets
-- -D warnings, and cargo test --workspace all clean; actionlint clean on
release-build.yml, nightly-science.yml, and (unchanged) release.yml;
`pytest tests/test_scientific.py tests/test_conformance.py` passes (22/22)
against the compiled CLI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-15 20:00:13 +03:00

34 lines
1.1 KiB
YAML

name: Nightly scientific checks
on:
schedule:
- cron: "23 3 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
scientific-fixtures:
runs-on: ubuntu-latest
env:
CARGO_NET_OFFLINE: "false"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.94.0
- run: cargo build -p lawsynth-cli
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: python -m pip install --upgrade pip pytest
# tests/scientific and tests/conformance hold declarative fixtures
# (case.toml/input.json/expected.json/run.py) executed directly per
# their own README, not pytest test_*.py files — pointing pytest at
# those directories collects zero tests (exit code 5). The real
# pytest-compatible wrappers live at tests/test_scientific.py and
# tests/test_conformance.py, which parametrize one test per case and
# run each case's own run.py against the native engine built above.
- run: python -m pytest -q tests/test_scientific.py tests/test_conformance.py