Skip to content

CI: skip duplicate test runs on PR creation #70

CI: skip duplicate test runs on PR creation

CI: skip duplicate test runs on PR creation #70

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
build:
# Skip redundant runs: don't run on push if there's an associated PR
if: github.event_name == 'pull_request' || github.event.pull_request == null
runs-on: ubuntu-24.04 # noble equivalent
strategy:
matrix:
include:
- python-version: "3.10"
toxenv: py310-core
- python-version: "3.11"
toxenv: py311-core
- python-version: "3.12"
toxenv: py312-core
- python-version: "3.13"
toxenv: py313-core
- python-version: "3.14"
toxenv: py314-core
- python-version: "3.10"
toxenv: py310-django42
- python-version: "3.10"
toxenv: py310-django50
- python-version: "3.10"
toxenv: py310-django51
- python-version: "3.10"
toxenv: py310-django52
- python-version: "3.13"
toxenv: py313-django42
- python-version: "3.13"
toxenv: py313-django52
- python-version: "3.12"
toxenv: py312-django60
- python-version: "3.14"
toxenv: py314-django60
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox pytest
- name: Set CLOUDINARY_URL
run: |
export CLOUDINARY_URL=$(bash tools/get_test_cloud.sh)
echo "cloud_name: $(echo $CLOUDINARY_URL | cut -d'@' -f2)"
echo "CLOUDINARY_URL=$CLOUDINARY_URL" >> $GITHUB_ENV
- name: Run tests
env:
TOXENV: ${{ matrix.toxenv }}
PYTHONPATH: ${{ github.workspace }}
run: tox -e $TOXENV