File tree Expand file tree Collapse file tree 3 files changed +51
-60
lines changed Expand file tree Collapse file tree 3 files changed +51
-60
lines changed Original file line number Diff line number Diff line change 1
- name : Black Formatting
1
+ ---
2
+ name : Python
2
3
3
- on : [pull_request]
4
+ on :
5
+ push :
6
+ branches : [ master ]
7
+ pull_request :
8
+ branches : [ master ]
4
9
5
10
jobs :
6
- build :
11
+ check :
7
12
runs-on : ubuntu-latest
8
-
9
13
steps :
10
14
- uses : actions/checkout@v1
11
15
- name : Output env variables
12
16
run : |
17
+ echo "Default branch=${default-branch}"
13
18
echo "GITHUB_WORKFLOW=${GITHUB_WORKFLOW}"
14
19
echo "GITHUB_ACTION=$GITHUB_ACTION"
15
20
echo "GITHUB_ACTIONS=$GITHUB_ACTIONS"
@@ -26,18 +31,36 @@ jobs:
26
31
cat $GITHUB_EVENT_PATH
27
32
echo "\n"
28
33
echo "::debug::---end"
29
-
30
- - name : Set up Python 3.7
31
- uses : actions/setup-python@v1
34
+ - name : Set up Python ${{ matrix.python-version }}
35
+ uses : actions/setup-python@v2
32
36
with :
33
- python-version : 3.7
34
-
37
+ python-version : 3.6
35
38
- name : Install dependencies
36
39
run : |
37
- python -m pip install --upgrade pip black
40
+ python3 -m pip install --upgrade pip
41
+ pip install tox tox-gh-actions
42
+ - name : Check
43
+ run : |
44
+ tox -e checks
45
+
46
+ tests :
47
+ needs : check
48
+ runs-on : ubuntu-latest
49
+ strategy :
50
+ max-parallel : 5
51
+ matrix :
52
+ python-version : [3.6, 3.7, 3.8, 3.9]
38
53
39
- - name : Run black
40
- id : black
54
+ steps :
55
+ - uses : actions/checkout@v1
56
+ - name : Set up Python ${{ matrix.python-version }}
57
+ uses : actions/setup-python@v2
58
+ with :
59
+ python-version : ${{ matrix.python-version }}
60
+ - name : Install dependencies
61
+ run : |
62
+ python3 -m pip install --upgrade pip
63
+ pip install tox tox-gh-actions
64
+ - name : Test with tox
41
65
run : |
42
- black --check .
43
- echo "::set-output name=rc::$?"
66
+ tox
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
[tox]
2
2
envlist =
3
- flake8
3
+ checks
4
4
py{27,34,35,36,37,38,39}
5
- pypy
5
+ isolated_build = True
6
+
7
+ [gh-actions]
8
+ python =
9
+ 2.7: py27
10
+ 3.4: py34
11
+ 3.5: py35
12
+ 3.6: py36
13
+ 3.7: py37
14
+ 3.8: py38
15
+ 3.9: py39
16
+ # 3.10: py310
17
+
6
18
7
19
[testenv]
8
20
description = Run test suite for {basepython}
You can’t perform that action at this time.
0 commit comments