Cron #1337
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 | |
on: | |
schedule: | |
# Run every day at 00:00 UTC | |
- cron: 0 0 * * * | |
jobs: | |
main: | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.pip-version }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- Ubuntu | |
- Windows | |
- MacOS | |
python-version: | |
- "3.11" | |
- "3.10" | |
- "3.9" | |
- "3.8" | |
- "3.7" | |
pip-version: | |
- main | |
include: | |
- os: Ubuntu | |
python-version: 3.12-dev | |
pip-version: main | |
env: | |
PY_COLORS: 1 | |
TOXENV: pip${{ matrix.pip-version }} | |
TOX_PARALLEL_NO_SPINNER: 1 | |
steps: | |
- uses: actions/checkout@main | |
- name: Set up Python ${{ matrix.python-version }} from GitHub | |
id: python-install | |
if: "!endsWith(matrix.python-version, '-dev')" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Python ${{ matrix.python-version }} from deadsnakes | |
if: endsWith(matrix.python-version, '-dev') | |
uses: deadsnakes/action@v2.1.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get pip cache dir | |
id: pip-cache | |
shell: bash | |
run: | | |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- name: Pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: >- | |
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{ | |
hashFiles('pyproject.toml') }}-${{ hashFiles('tox.ini') }}-${{ | |
hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install test dependencies | |
run: python -m pip install -U tox virtualenv | |
- name: Prepare test environment | |
run: tox --notest -p auto --parallel-live | |
- name: Test pip ${{ matrix.pip-version }} | |
run: tox | |
pypy: | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} / ${{ matrix.pip-version }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- Ubuntu | |
- MacOS | |
- Windows | |
python-version: | |
- pypy-3.8 | |
pip-version: | |
- latest | |
env: | |
PY_COLORS: 1 | |
TOXENV: pip${{ matrix.pip-version }} | |
TOX_PARALLEL_NO_SPINNER: 1 | |
steps: | |
- uses: actions/checkout@main | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get pip cache dir | |
id: pip-cache | |
shell: bash | |
run: | | |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- name: Pip cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: >- | |
${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}-${{ | |
hashFiles('pyproject.toml') }}-${{ hashFiles('tox.ini') }}-${{ | |
hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install tox | |
run: pip install tox | |
- name: Prepare test environment | |
run: tox --notest -p auto --parallel-live | |
- name: Test pip ${{ matrix.pip-version }} | |
run: tox |