-
Notifications
You must be signed in to change notification settings - Fork 135
68 lines (60 loc) · 2.1 KB
/
Copy pathtest.yml
File metadata and controls
68 lines (60 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Tests
on: [push, pull_request]
jobs:
build:
# Run on every branch push, but avoid duplicate runs when a same-repo PR
# exists: same-repo changes run via the push event, while fork PRs (which
# can't trigger a push in this repo) run via the pull_request event.
if: >-
(github.event_name == 'push' && !github.event.pull_request.head.repo.fork) ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork)
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