-
Notifications
You must be signed in to change notification settings - Fork 2
/
master.tmpl
100 lines (86 loc) · 2.49 KB
/
master.tmpl
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: master
on:
push:
branches:
- master
env:
TWINE_USERNAME: ${{ secrets.PYPI_PUSH_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PUSH_PASSWORD }}
jobs:
test:
runs-on: [[ workflow.runner_version ]]
strategy:
matrix:
python:
- [[ workflow.python27 ]]
- [[ workflow.python37 ]]
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install deps
run: PYTHON_VERSION=${{ matrix.python }} make install
- name: Run tests
run: PYTHON_VERSION=${{ matrix.python }} make test
lint:
runs-on: [[ workflow.runner_version ]]
strategy:
matrix:
python:
- [[ workflow.python27 ]]
- [[ workflow.python37 ]]
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install deps
run: PYTHON_VERSION=${{ matrix.python }} make install
- name: Run linters
run: PYTHON_VERSION=${{ matrix.python }} make lint
check_package:
runs-on: [[ workflow.runner_version ]]
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: [[ workflow.python37 ]]
- name: Install deps
run: PYTHON_VERSION=[[ workflow.python37 ]] make install
- name: Check package
run: PYTHON_VERSION=[[ workflow.python37 ]] make check-package
check_docs:
runs-on: [[ workflow.runner_version ]]
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: [[ workflow.python37 ]]
- name: Check documentation
run: PYTHON_VERSION=[[ workflow.python37 ]] make docs
build:
runs-on: [[ workflow.runner_version ]]
needs: [test, lint, check_package, check_docs]
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: [[ workflow.python37 ]]
- name: GitHub tag bump
id: tag
uses: anothrNick/github-tag-action@1.7.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fix lib version
run: |
echo "__version__ = '${{ steps.tag.outputs.new_tag }}'" > version.py
- name: Install deps
run: PYTHON_VERSION=[[ workflow.python37 ]] make install
- name: Build library
run: make build