@@ -17,35 +17,38 @@ jobs:
17
17
runs-on : ${{ matrix.os }}
18
18
timeout-minutes : 20
19
19
strategy :
20
- fail-fast : false # Don 't let a failed MacOS run stop the Ubuntu runs
20
+ fail-fast : false # don 't stop on first failure
21
21
matrix :
22
22
os : ['ubuntu-latest']
23
- python-version : ['3.7', '3.8', '3.10', '3.11']
23
+ python-version : ['3.7', '3.8', '3.10', '3.11', '3' ]
24
24
include :
25
25
# mac os test
26
26
- os : ' macos-11'
27
27
python-version : ' 3.7' # oldest supported version
28
+
28
29
# non-utc timezone test
29
30
- os : ' ubuntu-latest'
30
31
python-version : ' 3.9' # not the oldest, not the most recent version
31
32
time-zone : ' XXX-09:35'
33
+
32
34
env :
33
35
TZ : ${{ matrix.time-zone }}
34
36
PYTEST_ADDOPTS : --cov --cov-append -n 5 --color=yes
37
+
35
38
steps :
36
39
- name : Checkout
37
- uses : actions/checkout@v3
40
+ uses : actions/checkout@v4
38
41
39
42
- name : Configure Python
40
- uses : actions/setup-python@v4
43
+ uses : actions/setup-python@v5
41
44
with :
42
45
python-version : ${{ matrix.python-version }}
43
46
44
47
- name : Apt-Get Install
45
48
if : startsWith(matrix.os, 'ubuntu')
46
49
run : |
47
50
sudo apt-get update
48
- sudo apt-get install -y shellcheck sqlite3
51
+ sudo apt-get install -y sqlite3
49
52
50
53
- name : Install
51
54
run : |
@@ -54,37 +57,10 @@ jobs:
54
57
- name : Configure git # Needed by the odd test
55
58
uses : cylc/release-actions/configure-git@v1
56
59
57
- - name : Check changelog
58
- if : startsWith(matrix.os, 'ubuntu')
59
- run : towncrier build --draft
60
-
61
- - name : Style
62
- if : startsWith(matrix.os, 'ubuntu')
63
- run : |
64
- flake8
65
- etc/bin/shellchecker
66
-
67
- # note: exclude python 3.10+ from mypy checks as these produce false
68
- # positives in installed libraries for python 3.7
69
- - name : Typing
70
- if : startsWith(matrix.os, 'ubuntu') && startsWith(matrix.python-version, 3.9)
71
- run : mypy
72
-
73
- - name : Doctests
74
- timeout-minutes : 4
75
- run : |
76
- pytest cylc/flow
77
-
78
60
- name : Unit Tests
79
- timeout-minutes : 4
61
+ timeout-minutes : 5
80
62
run : |
81
- pytest tests/unit
82
-
83
- - name : Bandit
84
- if : ${{ matrix.python-version == '3.7' }}
85
- # https://github.com/PyCQA/bandit/issues/658
86
- run : |
87
- bandit -r --ini .bandit cylc/flow
63
+ pytest cylc/flow tests/unit
88
64
89
65
- name : Integration Tests
90
66
timeout-minutes : 6
93
69
94
70
- name : Upload failed tests artifact
95
71
if : failure()
96
- uses : actions/upload-artifact@v3
72
+ uses : actions/upload-artifact@v4
97
73
with :
98
74
name : cylc-run (${{ matrix.os }} py-${{ matrix.python-version }})
99
75
path : ~/cylc-run/
@@ -104,29 +80,67 @@ jobs:
104
80
coverage report
105
81
106
82
- name : Upload coverage artifact
107
- uses : actions/upload-artifact@v3
83
+ uses : actions/upload-artifact@v4
108
84
with :
109
85
name : coverage_${{ matrix.os }}_py-${{ matrix.python-version }}
110
86
path : coverage.xml
111
87
retention-days : 7
112
88
89
+ lint :
90
+ runs-on : ' ubuntu-latest'
91
+ timeout-minutes : 10
92
+ steps :
93
+ - name : Apt-Get Install
94
+ run : |
95
+ sudo apt-get update
96
+ sudo apt-get install -y shellcheck
97
+
98
+ - name : Checkout
99
+ uses : actions/checkout@v4
100
+
101
+ # note: exclude python 3.10+ from mypy checks as these produce false
102
+ # positives in installed libraries for python 3.7
103
+ - name : Configure Python
104
+ uses : actions/setup-python@v5
105
+ with :
106
+ python-version : 3.9
107
+
108
+ - name : Install
109
+ run : |
110
+ pip install -e ."[tests]"
111
+
112
+ - name : Flake8
113
+ run : flake8
114
+
115
+ - name : Bandit
116
+ run : |
117
+ bandit -r --ini .bandit cylc/flow
118
+
119
+ - name : Shellchecker
120
+ run : etc/bin/shellchecker
121
+
122
+ - name : MyPy
123
+ run : mypy
124
+
125
+ - name : Towncrier
126
+ run : towncrier build --draft
127
+
113
128
- name : Linkcheck
114
- if : startsWith(matrix.python-version, '3.10')
115
- run : pytest -m linkcheck --dist=load tests/unit
129
+ run : pytest -m linkcheck --dist=load --color=yes -n 10 tests/unit/test_links.py
116
130
117
131
codecov :
118
132
needs : test
119
133
runs-on : ubuntu-latest
120
134
timeout-minutes : 2
121
135
steps :
122
136
- name : Checkout
123
- uses : actions/checkout@v3
137
+ uses : actions/checkout@v4
124
138
125
139
- name : Download coverage artifacts
126
- uses : actions/download-artifact@v3
140
+ uses : actions/download-artifact@v4
127
141
128
142
- name : Codecov upload
129
- uses : codecov/codecov-action@v3
143
+ uses : codecov/codecov-action@v4
130
144
with :
131
145
name : ${{ github.workflow }}
132
146
flags : fast-tests
0 commit comments