-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (64 loc) · 1.61 KB
/
master.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
name: master
on:
push:
branches:
- master
env:
TWINE_USERNAME: ${{ secrets.PYPI_PUSH_USER }}
TWINE_PASSWORD: ${{ secrets.PYPI_PUSH_PASSWORD }}
jobs:
test:
runs-on: ubuntu-18.04
strategy:
matrix:
python:
- 2.7
- 3.7
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: ubuntu-18.04
strategy:
matrix:
python:
- 2.7
- 3.7
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
build:
runs-on: ubuntu-18.04
needs: [test, lint]
steps:
- uses: actions/checkout@v1
- name: Setup python
uses: actions/setup-python@v1
with:
python-version: 3.7
- 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=${{ matrix.python }} make install
- name: Build library
run: make build