4
4
push :
5
5
branches :
6
6
- main
7
- - 2.*
8
- pull_request : ~
7
+ - " maintenance/**"
8
+ pull_request :
9
+ branches :
10
+ - main
11
+ - " maintenance/**"
9
12
10
13
env :
11
- CACHE_VERSION : 27
12
- DEFAULT_PYTHON : " 3.10"
14
+ CACHE_VERSION : 1
15
+ KEY_PREFIX : base-venv
16
+ DEFAULT_PYTHON : " 3.11"
13
17
PRE_COMMIT_CACHE : ~/.cache/pre-commit
14
18
15
19
concurrency :
16
20
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17
21
cancel-in-progress : true
18
22
23
+ permissions :
24
+ contents : read
25
+
19
26
jobs :
20
27
prepare-base :
21
28
name : Prepare base dependencies
@@ -26,28 +33,27 @@ jobs:
26
33
pre-commit-key : ${{ steps.generate-pre-commit-key.outputs.key }}
27
34
steps :
28
35
- name : Check out code from GitHub
29
- uses : actions/checkout@v3.0.2
36
+ uses : actions/checkout@v3.2.0
30
37
- name : Set up Python ${{ env.DEFAULT_PYTHON }}
31
38
id : python
32
- uses : actions/setup-python@v4.2 .0
39
+ uses : actions/setup-python@v4.4 .0
33
40
with :
34
41
python-version : ${{ env.DEFAULT_PYTHON }}
42
+ check-latest : true
35
43
- name : Generate partial Python venv restore key
36
44
id : generate-python-key
37
45
run : >-
38
- echo "::set-output name= key::base-venv -${{ env.CACHE_VERSION }}-${{
39
- hashFiles('setup.cfg ', 'requirements_test.txt', 'requirements_test_min.txt')
40
- }}"
46
+ echo "key=${{ env.KEY_PREFIX }} -${{ env.CACHE_VERSION }}-${{
47
+ hashFiles('pyproject.toml ', 'requirements_test.txt',
48
+ 'requirements_test_min.txt') }}" >> $GITHUB_OUTPUT
41
49
- name : Restore Python virtual environment
42
50
id : cache-venv
43
- uses : actions/cache@v3.0.8
51
+ uses : actions/cache@v3.2.1
44
52
with :
45
53
path : venv
46
54
key : >-
47
55
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
48
56
steps.generate-python-key.outputs.key }}
49
- restore-keys : |
50
- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-
51
57
- name : Create Python virtual environment
52
58
if : steps.cache-venv.outputs.cache-hit != 'true'
53
59
run : |
@@ -59,17 +65,15 @@ jobs:
59
65
- name : Generate pre-commit restore key
60
66
id : generate-pre-commit-key
61
67
run : >-
62
- echo "::set-output name= key:: pre-commit-${{ env.CACHE_VERSION }}-${{
63
- hashFiles('.pre-commit-config.yaml') }}"
68
+ echo "key= pre-commit-${{ env.CACHE_VERSION }}-${{
69
+ hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
64
70
- name : Restore pre-commit environment
65
71
id : cache-precommit
66
- uses : actions/cache@v3.0.8
72
+ uses : actions/cache@v3.2.1
67
73
with :
68
74
path : ${{ env.PRE_COMMIT_CACHE }}
69
75
key : >-
70
76
${{ runner.os }}-${{ steps.generate-pre-commit-key.outputs.key }}
71
- restore-keys : |
72
- ${{ runner.os }}-pre-commit-${{ env.CACHE_VERSION }}-
73
77
- name : Install pre-commit dependencies
74
78
if : steps.cache-precommit.outputs.cache-hit != 'true'
75
79
run : |
@@ -83,15 +87,16 @@ jobs:
83
87
needs : prepare-base
84
88
steps :
85
89
- name : Check out code from GitHub
86
- uses : actions/checkout@v3.0.2
90
+ uses : actions/checkout@v3.2.0
87
91
- name : Set up Python ${{ env.DEFAULT_PYTHON }}
88
92
id : python
89
- uses : actions/setup-python@v4.2 .0
93
+ uses : actions/setup-python@v4.4 .0
90
94
with :
91
95
python-version : ${{ env.DEFAULT_PYTHON }}
96
+ check-latest : true
92
97
- name : Restore Python virtual environment
93
98
id : cache-venv
94
- uses : actions/cache@v3.0.8
99
+ uses : actions/cache@v3.2.1
95
100
with :
96
101
path : venv
97
102
key :
@@ -104,7 +109,7 @@ jobs:
104
109
exit 1
105
110
- name : Restore pre-commit environment
106
111
id : cache-precommit
107
- uses : actions/cache@v3.0.8
112
+ uses : actions/cache@v3.2.1
108
113
with :
109
114
path : ${{ env.PRE_COMMIT_CACHE }}
110
115
key : ${{ runner.os }}-${{ needs.prepare-base.outputs.pre-commit-key }}
@@ -116,11 +121,12 @@ jobs:
116
121
- name : Install enchant and aspell
117
122
run : |
118
123
sudo apt-get update
119
- sudo apt-get install enchant aspell-en
124
+ sudo apt-get install enchant-2 aspell-en
120
125
- name : Run pylint checks
121
126
run : |
122
127
. venv/bin/activate
123
128
pip install -e .
129
+ pip list | grep 'astroid\|pylint'
124
130
pre-commit run --hook-stage manual pylint-with-spelling --all-files
125
131
126
132
spelling :
@@ -130,15 +136,16 @@ jobs:
130
136
needs : prepare-base
131
137
steps :
132
138
- name : Check out code from GitHub
133
- uses : actions/checkout@v3.0.2
139
+ uses : actions/checkout@v3.2.0
134
140
- name : Set up Python ${{ env.DEFAULT_PYTHON }}
135
141
id : python
136
- uses : actions/setup-python@v4.2 .0
142
+ uses : actions/setup-python@v4.4 .0
137
143
with :
138
144
python-version : ${{ env.DEFAULT_PYTHON }}
145
+ check-latest : true
139
146
- name : Restore Python virtual environment
140
147
id : cache-venv
141
- uses : actions/cache@v3.0.8
148
+ uses : actions/cache@v3.2.1
142
149
with :
143
150
path : venv
144
151
key :
@@ -157,19 +164,20 @@ jobs:
157
164
documentation :
158
165
name : documentation
159
166
runs-on : ubuntu-latest
160
- timeout-minutes : 10
167
+ timeout-minutes : 20
161
168
needs : prepare-base
162
169
steps :
163
170
- name : Check out code from GitHub
164
- uses : actions/checkout@v3.0.2
171
+ uses : actions/checkout@v3.2.0
165
172
- name : Set up Python ${{ env.DEFAULT_PYTHON }}
166
173
id : python
167
- uses : actions/setup-python@v4.2 .0
174
+ uses : actions/setup-python@v4.4 .0
168
175
with :
169
176
python-version : ${{ env.DEFAULT_PYTHON }}
177
+ check-latest : true
170
178
- name : Restore Python virtual environment
171
179
id : cache-venv
172
- uses : actions/cache@v3.0.8
180
+ uses : actions/cache@v3.2.1
173
181
with :
174
182
path : venv
175
183
key :
0 commit comments