@@ -17,35 +17,37 @@ jobs:
1717 runs-on : ${{ matrix.os }}
1818 timeout-minutes : 20
1919 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
2121 matrix :
2222 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' ]
2424 include :
2525 # mac os test
2626 - os : ' macos-11'
27- python-version : ' 3.8 ' # oldest supported version
27+ python-version : ' 3.7 ' # oldest supported version
2828 # non-utc timezone test
2929 - os : ' ubuntu-latest'
3030 python-version : ' 3.9' # not the oldest, not the most recent version
3131 time-zone : ' XXX-09:35'
32+
3233 env :
3334 TZ : ${{ matrix.time-zone }}
3435 PYTEST_ADDOPTS : --cov --cov-append -n 5 --color=yes
36+
3537 steps :
3638 - name : Checkout
37- uses : actions/checkout@v3
39+ uses : actions/checkout@v4
3840
3941 - name : Configure Python
40- uses : actions/setup-python@v4
42+ uses : actions/setup-python@v5
4143 with :
4244 python-version : ${{ matrix.python-version }}
4345
4446 - name : Apt-Get Install
4547 if : startsWith(matrix.os, 'ubuntu')
4648 run : |
4749 sudo apt-get update
48- sudo apt-get install -y shellcheck sqlite3
50+ sudo apt-get install -y sqlite3
4951
5052 - name : Install
5153 run : |
@@ -54,37 +56,10 @@ jobs:
5456 - name : Configure git # Needed by the odd test
5557 uses : cylc/release-actions/configure-git@v1
5658
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-
7859 - name : Unit Tests
79- timeout-minutes : 4
80- run : |
81- pytest tests/unit
82-
83- - name : Bandit
84- if : ${{ matrix.python-version == '3.7' }}
85- # https://github.com/PyCQA/bandit/issues/658
60+ timeout-minutes : 5
8661 run : |
87- bandit -r --ini .bandit cylc/flow
62+ pytest cylc/flow tests/unit
8863
8964 - name : Integration Tests
9065 timeout-minutes : 6
9368
9469 - name : Upload failed tests artifact
9570 if : failure()
96- uses : actions/upload-artifact@v3
71+ uses : actions/upload-artifact@v4
9772 with :
9873 name : cylc-run (${{ matrix.os }} py-${{ matrix.python-version }})
9974 path : ~/cylc-run/
@@ -104,29 +79,67 @@ jobs:
10479 coverage report
10580
10681 - name : Upload coverage artifact
107- uses : actions/upload-artifact@v3
82+ uses : actions/upload-artifact@v4
10883 with :
10984 name : coverage_${{ matrix.os }}_py-${{ matrix.python-version }}
11085 path : coverage.xml
11186 retention-days : 7
11287
88+ lint :
89+ runs-on : ' ubuntu-latest'
90+ timeout-minutes : 10
91+ steps :
92+ - name : Apt-Get Install
93+ run : |
94+ sudo apt-get update
95+ sudo apt-get install -y shellcheck
96+
97+ - name : Checkout
98+ uses : actions/checkout@v4
99+
100+ # note: exclude python 3.10+ from mypy checks as these produce false
101+ # positives in installed libraries for python 3.7
102+ - name : Configure Python
103+ uses : actions/setup-python@v5
104+ with :
105+ python-version : 3.9
106+
107+ - name : Install
108+ run : |
109+ pip install -e ."[tests]"
110+
111+ - name : Flake8
112+ run : flake8
113+
114+ - name : Bandit
115+ run : |
116+ bandit -r --ini .bandit cylc/flow
117+
118+ - name : Shellchecker
119+ run : etc/bin/shellchecker
120+
121+ - name : MyPy
122+ run : mypy
123+
124+ - name : Towncrier - draft changelog
125+ uses : cylc/release-actions/towncrier-draft@v1
126+
113127 - name : Linkcheck
114- if : startsWith(matrix.python-version, '3.10')
115- run : pytest -m linkcheck --dist=load tests/unit
128+ run : pytest -m linkcheck --dist=load --color=yes -n 10 tests/unit/test_links.py
116129
117130 codecov :
118131 needs : test
119132 runs-on : ubuntu-latest
120133 timeout-minutes : 2
121134 steps :
122135 - name : Checkout
123- uses : actions/checkout@v3
136+ uses : actions/checkout@v4
124137
125138 - name : Download coverage artifacts
126- uses : actions/download-artifact@v3
139+ uses : actions/download-artifact@v4
127140
128141 - name : Codecov upload
129- uses : codecov/codecov-action@v3
142+ uses : codecov/codecov-action@v4
130143 with :
131144 name : ${{ github.workflow }}
132145 flags : fast-tests
0 commit comments