1
1
name : Build
2
2
3
- on : [push, pull_request]
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
4
8
5
9
jobs :
6
10
checks :
7
- name : Lint, typing, coverage
8
- runs-on : ubuntu-latest
11
+ name : Lint, typing, security
12
+ runs-on : ubuntu-18.04
9
13
10
14
steps :
11
15
- uses : actions/checkout@v2
12
16
13
17
- name : Set up Python 3.8
14
- uses : actions/setup-python@v1
18
+ uses : actions/setup-python@v2
15
19
with :
16
20
python-version : 3.8
17
21
@@ -27,10 +31,12 @@ jobs:
27
31
- name : Black
28
32
run : tox -e black
29
33
34
+ - name : Bandit
35
+ run : tox -e bandit
30
36
31
37
tests-ubuntu :
32
38
name : " Test: py${{ matrix.python-version }}, Ubuntu"
33
- runs-on : ubuntu-latest
39
+ runs-on : ubuntu-18.04
34
40
strategy :
35
41
matrix :
36
42
python-version : [3.6, 3.7, 3.8]
55
61
56
62
tests-no-extra-deps :
57
63
name : " Test: py${{ matrix.python-version }}, Ubuntu, no extra deps"
58
- runs-on : ubuntu-latest
64
+ runs-on : ubuntu-18.04
59
65
strategy :
60
66
matrix :
61
67
python-version : [3.6, 3.7, 3.8]
64
70
- uses : actions/checkout@v2
65
71
66
72
- name : Set up Python ${{ matrix.python-version }}
67
- uses : actions/setup-python@v1
73
+ uses : actions/setup-python@v2
68
74
with :
69
75
python-version : ${{ matrix.python-version }}
70
76
78
84
run : bash <(curl -s https://codecov.io/bash) -cF tests
79
85
80
86
87
+ - name : Upload coverage report
88
+ run : bash <(curl -s https://codecov.io/bash)
89
+
81
90
tests-other-os :
82
91
name : " Test: py3.8, ${{ matrix.os }}"
83
92
runs-on : " ${{ matrix.os }}"
89
98
- uses : actions/checkout@v2
90
99
91
100
- name : Set up Python 3.8
92
- uses : actions/setup-python@v1
101
+ uses : actions/setup-python@v2
93
102
with :
94
103
python-version : 3.8
95
104
@@ -99,18 +108,17 @@ jobs:
99
108
- name : Run tests
100
109
run : tox -e py
101
110
102
-
103
111
publish :
104
112
name : " Publish package to PyPI"
105
- runs-on : ubuntu-latest
113
+ runs-on : ubuntu-18.04
106
114
needs : [checks, tests-ubuntu, tests-other-os]
107
115
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
108
116
109
117
steps :
110
118
- uses : actions/checkout@v2
111
119
112
120
- name : Set up Python 3.8
113
- uses : actions/setup-python@v1
121
+ uses : actions/setup-python@v2
114
122
with :
115
123
python-version : 3.8
116
124
0 commit comments