heretic/.github/workflows/ci.yml
Philipp Emanuel Weidmann 0146b2760f
Some checks are pending
CI / Check and build (Python 3.10) (push) Waiting to run
CI / Check and build (Python 3.11) (push) Waiting to run
CI / Check and build (Python 3.12) (push) Waiting to run
CI / Check and build (Python 3.13) (push) Waiting to run
feat: headless operation + end-to-end tests (#392)
* fix: remove notebook input shims

Closes #280

* feat: support headless operation (no interactive input)

* fix: prevent infinite loops

* feat: add end-to-end tests

* ci: run tests in CI

* ci: fix test output ordering

* fix: replace home-cooked `set_seed` function with Transformers builtin

* feat: print PyTorch config when running tests

* feat: print additional information

* experiment: try to standardize test environment

* fix: revert environment changes

* feat: support multiple valid hashes for each output file

* feat: add test output hashes for CI

* feat: add test output hashes for CI (alternative environment)

* feat: add hashes for Windows (#394)

* fix: Hash on windows

* trigger ci

* fix: prefer .yaml (used widely than .toml for model configs)

* use removeprefix

* docs: restore commet

* use removeprefix again

* tests: Add windows hash files for all test models

* trigger ci

* fix: minor cleanup

* clean merge mismatch

* remove unnecessary CRLF replace, now that we support more SUMS files

* fix: use binary mode for hashes everywhere

---------

Co-authored-by: Vinay Umrethe <umrethevinay@gmail.com>
2026-06-27 13:41:48 +05:30

58 lines
1.4 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
checks:
name: Check and build (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Check formatting
run: uv run ruff format --check .
- name: Lint and check import sorting
run: uv run ruff check --output-format=github --extend-select I .
- name: Check typing
run: uv run ty check --output-format=github --error-on-warning .
- name: Run tests
env:
PYTHONUNBUFFERED: "1"
run: uv run tests/run_tests.py 2>&1
- name: Build package
run: uv build
- name: Verify build artifacts
run: |
if [ ! -d "dist" ]; then
echo "Build failed: 'dist' directory not found."
exit 1
fi
echo "Build artifacts found:"
ls -l dist/