Cron Tests #315
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: Cron Tests | |
on: | |
schedule: | |
# run at 6am UTC on Tue-Fri (complete tests are run every Monday) | |
- cron: '0 6 * * 2-5' | |
workflow_dispatch: | |
env: | |
TOXARGS: '-v' | |
permissions: | |
contents: read | |
jobs: | |
cron-test: | |
name: ${{ matrix.os }}, ${{ matrix.tox_env }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.allow_failure }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python: '3.11' | |
tox_env: 'linkcheck' | |
allow_failure: false | |
- os: ubuntu-latest | |
python: '3.11' | |
tox_env: 'py311-test-alldeps-devdeps' | |
toxposargs: --remote-data=any | |
allow_failure: false | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install base dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
- name: Print Python, pip, setuptools, and tox versions | |
run: | | |
python -c "import sys; print(f'Python {sys.version}')" | |
python -c "import pip; print(f'pip {pip.__version__}')" | |
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')" | |
python -c "import tox; print(f'tox {tox.__version__}')" | |
- name: Run tests | |
run: tox -e ${{ matrix.tox_env }} -- ${{ matrix.toxposargs }} | |
- name: Upload coverage to codecov | |
if: ${{ contains(matrix.tox_env, '-cov') }} | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
verbose: true |