test #324
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: test | |
on: | |
pull_request: | |
push: | |
branches: ["main", "v[0-9]*"] | |
tags: ["v[0-9]*"] | |
workflow_dispatch: | |
schedule: | |
# Weekly test (on branch main) every Thursday at 12:00 UTC. | |
# (Used to monitor compatibility with Django patches/dev and other dependencies.) | |
- cron: "0 12 * * 4" | |
jobs: | |
get-envlist: | |
runs-on: ubuntu-20.04 | |
outputs: | |
envlist: ${{ steps.generate-envlist.outputs.envlist }} | |
steps: | |
- name: Get code | |
uses: actions/checkout@v3 | |
- name: Install tox-gh-matrix | |
run: | | |
python -m pip install 'tox<4' 'tox-gh-matrix<0.3' | |
python -m tox --version | |
- name: Generate tox envlist | |
id: generate-envlist | |
run: | | |
python -m tox --gh-matrix | |
python -m tox --gh-matrix-dump # for debugging | |
test: | |
runs-on: ubuntu-20.04 | |
needs: get-envlist | |
strategy: | |
matrix: | |
tox: ${{ fromJSON(needs.get-envlist.outputs.envlist) }} | |
fail-fast: false | |
name: ${{ matrix.tox.name }} ${{ matrix.tox.ignore_outcome && 'allow-failures' || '' }} | |
timeout-minutes: 15 | |
steps: | |
- name: Get code | |
uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.tox.python.version }} | |
# Ensure matrix Python version is installed and available for tox | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.tox.python.spec }} | |
- name: Setup default Python | |
# Change default Python version back to something consistent | |
# for installing/running tox | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install tox | |
run: | | |
set -x | |
python -VV | |
python -m pip install 'tox<4' | |
python -m tox --version | |
- name: Test ${{ matrix.tox.name }} | |
run: | | |
python -m tox -e ${{ matrix.tox.name }} | |
continue-on-error: ${{ matrix.tox.ignore_outcome == true }} | |
env: | |
CONTINUOUS_INTEGRATION: true | |
TOX_OVERRIDE_IGNORE_OUTCOME: false |