Document the green release gate #6
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| core: | |
| name: Core / Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install core and test runner | |
| run: python -m pip install --upgrade pip pytest && python -m pip install -e . | |
| - name: Run tests without optional research dependencies | |
| run: pytest -q | |
| research: | |
| name: Research suite / Python 3.11 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install research dependencies | |
| run: python -m pip install --upgrade pip && python -m pip install -e ".[train,reproduce,dev]" | |
| - name: Run complete test suite | |
| run: pytest -q | |
| package: | |
| name: Build and inspect package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Validate release contract | |
| run: python scripts/check_release.py | |
| - name: Build sdist and wheel | |
| run: python -m pip install --upgrade pip build twine && python -m build | |
| - name: Validate distribution metadata | |
| run: python -m twine check dist/* | |
| - name: Install wheel in a clean environment | |
| run: | | |
| python -m venv /tmp/hypermix-wheel-check | |
| /tmp/hypermix-wheel-check/bin/python -m pip install dist/*.whl | |
| /tmp/hypermix-wheel-check/bin/python -c "import importlib.resources as r; import hypermix; assert r.files('hypermix.data').joinpath('reference_spectra.csv').is_file()" | |
| webapp: | |
| name: Observatory build / Node 22 | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: webapp | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: webapp/package-lock.json | |
| - name: Install locked dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Type-check | |
| run: npm run typecheck | |
| - name: Audit production dependency graph | |
| run: npm audit --omit=dev | |
| - name: Build and test Sites output | |
| run: npm test | |
| - name: Build for Vercel | |
| run: npm run build:vercel |