Skip to content

Scheduled Tests

Scheduled Tests #24

Workflow file for this run

name: Scheduled Tests
on:
schedule:
# Run daily at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch:
# Allow manual triggering
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Ensure numpy < 2 for PyTorch compatibility
pip install "numpy<2"
# Install package in editable mode for import tests
pip install -e .
- name: Run tests
run: |
python -m unittest discover -v
working-directory: ./tests
- name: Test package import
run: |
python -c "from gainpro import Data, Params, Network, Metrics; print('Package imports successful!')"