Skip to content

Kidlang pipeline

Kidlang pipeline #118

name: Automated Testing for NYUAD Pipelines
on:
push:
branches: [ main ]
pull_request:
jobs:
test:
name: Test on ${{ matrix.os }} (Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
# include the subdir requirements file so cache keys update when it changes
cache-dependency-path: |
pipeline/mne_pipelines/requirements.txt
- name: Upgrade pip tooling
shell: bash
run: python -m pip install --upgrade pip setuptools wheel
- name: Install deps (tests + subdir requirements)
shell: bash
env:
PIP_PREFER_BINARY: "1"
run: |
# Install the subdir requirements you added (pandas + mne==1.10.2)
python -m pip install -r pipeline/mne_pipelines/requirements.txt
# PyTest itself
python -m pip install pytest pytest-cov
- name: Verify key packages
shell: bash
run: |
python - <<'PY'
import sys, mne, pandas
print("Python:", sys.version.split()[0])
print("MNE:", mne.__version__)
print("pandas:", pandas.__version__)
PY
- name: Ensure MEG_DATA exists
shell: bash
run: mkdir -p "$GITHUB_WORKSPACE/pipeline/mne_pipelines/kit_general_pipelines"
- name: Run pytest
shell: bash
env:
PYTHONPATH: ${{ github.workspace }}
MPLBACKEND: Agg # avoid TkAgg on headless CI
MEG_DATA: ${{ github.workspace }}/pipeline/mne_pipelines/kit_general_pipelines
BOX_CLIENT_SDK_CONFIG: ${{ secrets.BOX_CLIENT_SDK_CONFIG }}
BOX_MEG_DATA_PARENT_FOLDER_ID: ${{ secrets.BOX_MEG_DATA_PARENT_FOLDER_ID }}
PYTHONIOENCODING: "utf-8" # ← add this line
run: pytest -v tests/
- name: Upload pytest results (on failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: pytest-logs-${{ matrix.os }}-py${{ matrix.python-version }}
path: |
.pytest_cache/
**/sanity_check_overview.csv
**/*.log