Files
django-anymail/.github/workflows/test.yml
medmunds 07f5d5f224 CI: update action dependencies
Fixes Node 12 deprecation warnings.

- actions/checkout@v2 --> v3
- actions/setup-python@v2 --> v4
- fkirc/skip-duplicate-actions@v3.4.1 --> v5.3.0
  [pinned to hash]

Also set continue-on-error true in skip_duplicate_runs job,
per recommendation in skip-duplicate-actions release notes.
2022-12-18 16:20:24 -08:00

75 lines
2.5 KiB
YAML

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.2'
python -m tox --version
- name: Generate tox envlist
id: generate-envlist
# Ugh. pypy-3.8-v7.3.8 accidentally includes an ancient sqlite unusable by Django,
# so change "pypy-3.8" to specific (older) version "pypy-3.8-v7.3.7".
# (Remove these `sed` commands after pypy-3.8-v7.3.9 is released.)
# https://foss.heptapod.net/pypy/pypy/-/issues/3690
# https://github.com/actions/setup-python/issues/339
run: |
python -m tox --gh-matrix | sed -e 's/"pypy-3\.8"/"pypy-3.8-v7.3.7"/g'
python -m tox --gh-matrix-dump | sed -e 's/"pypy-3\.8"/"pypy-3.8-v7.3.7"/g' # 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