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