Update pytest.yaml #1300
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python package tests | |
on: | |
push: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
schedule: | |
- cron: "0 12 * * 1" | |
pull_request_target: | |
types: [opened, synchronize, reopened, ready_for_review] | |
jobs: | |
fast-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
pip install pytest pytest-cov pytest-xdist pytest-timeout | |
- name: Set up environment | |
run: | | |
echo "HF_TOKEN=${{ vars.HF_TOKEN }}" > .env | |
- name: Run fast tests | |
run: | | |
pytest -vv \ | |
--durations=10 \ | |
-n 2 \ | |
--timeout=60 \ | |
--cov=quartz_solar_forecast \ | |
--cov-report=xml \ | |
-m "not slow" \ | |
-k "not test_run_forecast_historical and not test_run_forecast_no_ts" | |
slow-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
pip install pytest pytest-cov pytest-xdist pytest-timeout | |
- name: Set up environment | |
run: | | |
echo "HF_TOKEN=${{ vars.HF_TOKEN }}" > .env | |
- name: Run slow tests | |
run: | | |
pytest -vv \ | |
--durations=10 \ | |
-n 1 \ | |
--timeout=600 \ | |
-k "test_run_forecast_historical or test_run_forecast_no_ts" |