forked from chrisdev/django-pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 2.28 KB
/
test.yml
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: Test
on: [push, pull_request, workflow_dispatch]
env:
FORCE_COLOR: 1
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
django-version: ["18", "19", "110", "111", "20", "21", "22", "30", "31", "32"]
exclude:
- {python-version: "2.7", django-version: "20"}
- {python-version: "2.7", django-version: "21"}
- {python-version: "2.7", django-version: "22"}
- {python-version: "2.7", django-version: "30"}
- {python-version: "2.7", django-version: "31"}
- {python-version: "2.7", django-version: "32"}
- {python-version: "3.5", django-version: "30"}
- {python-version: "3.5", django-version: "31"}
- {python-version: "3.5", django-version: "32"}
- {python-version: "3.10", django-version: "18"}
- {python-version: "3.10", django-version: "19"}
- {python-version: "3.10", django-version: "110"}
- {python-version: "3.10", django-version: "111"}
- {python-version: "3.10", django-version: "20"}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U tox
- name: Test
run: tox -e py${{ matrix.python-version }}-django${{ matrix.django-version }}
all-successful:
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: build package
run: |
python -m pip install -U build
python -m build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: note that all tests succeeded
run: echo "🎉"