name: Cognition Programme on: push: branches: [main] paths: - 'src/research/**' - 'src/dashboard/experiment_workflow.py' - 'research/**' - 'tests/test_cognition_program.py' - 'scripts/publication_cognition.py' - '.github/workflows/cognition-program.yml' pull_request: branches: [main] workflow_dispatch: permissions: contents: read jobs: cognition: runs-on: ubuntu-latest timeout-minutes: 15 steps: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 with: python-version: '3.13' - name: Install repository test toolchain run: python -m pip install -e '.[dev,docs]' - name: Verify current and historical publication bytes run: | python scripts/publication_bundle.py python scripts/publication_revision.py python scripts/publication_cognition.py - name: Cognition instruments and boundaries run: python -m pytest tests/test_cognition_program.py tests/test_publication_revision.py tests/test_publication_integration.py -q - name: Format and lint run: | python -m black --check src/research/cognition_metrics.py src/research/cognition_governance.py scripts/publication_cognition.py tests/test_cognition_program.py python -m ruff check src/research/cognition_metrics.py src/research/cognition_governance.py scripts/publication_cognition.py tests/test_cognition_program.py - name: Checks must not rewrite research artifacts run: git diff --exit-code -- research