Skip to content

Merge pull request #6 from stef1949/codex/evaluate-and-improve-neural… #58

Merge pull request #6 from stef1949/codex/evaluate-and-improve-neural…

Merge pull request #6 from stef1949/codex/evaluate-and-improve-neural… #58

Workflow file for this run

name: Unit Tests
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
env:
WANDB_MODE: offline
WANDB_SILENT: "true"
CUDA_VISIBLE_DEVICES: ""
MPLBACKEND: Agg
PIP_DISABLE_PIP_VERSION_CHECK: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Ensure a test runner is available even if not listed in requirements
pip install pytest
- name: Run unit tests
run: |
# Prefer pytest if tests exist; otherwise fall back to unittest discovery
if compgen -G "tests/*.py" > /dev/null || compgen -G "test_*.py" > /dev/null || compgen -G "*_test.py" > /dev/null; then
pytest -q
else
python -m unittest discover -v || true
fi