-
Notifications
You must be signed in to change notification settings - Fork 4
78 lines (71 loc) · 2.09 KB
/
ci.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
69
70
71
72
73
74
75
76
77
78
name: Django Priority Batch CI
on:
push:
branches:
- master
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
pull_request:
schedule:
- cron: "30 2 * * *"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
tox-env: [py36, py37, py38, py39, py310, linters, packaging, migrations]
include:
- tox-env: py36
python-version: 3.6
- tox-env: py37
python-version: 3.7
- tox-env: py38
python-version: 3.8
- tox-env: py39
python-version: 3.9
- tox-env: py310
python-version: "3.10"
- tox-env: linters
python-version: "3.10"
- tox-env: packaging
python-version: "3.10"
- tox-env: migrations
python-version: "3.10"
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 --upgrade pip tox
- name: Run Tests
run: >
tox -e ${{ matrix.tox-env }}
--recreate
- name: Upload coverage to Codecov
if: matrix.tox-env == 'py37' || matrix.tox-env == 'py38' || matrix.tox-env == 'py39' || matrix.tox-env == 'py310'
uses: codecov/codecov-action@v1
with:
file: .coverage
build:
runs-on: ubuntu-20.04
needs: test
if: "startsWith(github.ref, 'refs/tags')"
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Install build
run: python -m pip install --user build
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_password }}