Skip to content

CI Validation

CI Validation #442

Workflow file for this run

name: CI Validation
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main", "develop"]
schedule:
- cron: "0 2 * * *"
workflow_dispatch: {}
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fast-pr-checks:
name: Fast On-Demand Checks
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Fast repository verification
run: |
python tests/verify_repo.py --check git-status,entrypoints-smoke,import-boundaries,pytest-modularity,linting,ruff,mypy --no-fix
nightly-deep-checks:
name: Nightly Deep Checks
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Nightly repository verification
run: |
python tests/verify_repo.py --check git-status,entrypoints-smoke,bids-compat-smoke,path-hygiene,system-file-filtering,import-boundaries,python-security,unsafe-patterns,dependencies,pip-audit,pytest,linting,ruff,mypy,testing,todos,documentation --no-fix
coverage:
name: Coverage Report (Python ${{ matrix.python-version }})
if: github.event_name == 'push' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Run tests with coverage
run: |
pytest tests/ --cov=src --cov=app/src --cov-report=xml --cov-report=term-missing -q
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
# Pin to v5.5.0 commit to avoid transient tag-resolution/codeload issues.
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00
continue-on-error: true
with:
files: coverage.xml
fail_ci_if_error: false
docs-build:
name: Docs Build
if: github.event_name == 'push' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Build docs with warnings as errors
run: |
sphinx-build -b html docs docs/_build/html -W