88 pull_request : ~
99
1010env :
11- CACHE_VERSION : 6
11+ CACHE_VERSION : 2
12+ KEY_PREFIX : venv
1213 DEFAULT_PYTHON : " 3.10"
1314 PRE_COMMIT_CACHE : ~/.cache/pre-commit
1415
@@ -19,50 +20,47 @@ jobs:
1920 timeout-minutes : 20
2021 steps :
2122 - name : Check out code from GitHub
22- uses : actions/checkout@v3.0.2
23+ uses : actions/checkout@v3.1.0
2324 - name : Set up Python ${{ env.DEFAULT_PYTHON }}
2425 id : python
25- uses : actions/setup-python@v4.2 .0
26+ uses : actions/setup-python@v4.3 .0
2627 with :
2728 python-version : ${{ env.DEFAULT_PYTHON }}
29+ check-latest : true
2830 - name : Generate partial Python venv restore key
2931 id : generate-python-key
3032 run : >-
31- echo "::set-output name=key::base-venv-${{ env.CACHE_VERSION }}-${{
32- hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt',
33- 'requirements_test_brain.txt', 'requirements_test_pre_commit.txt') }}"
33+ echo "key=base-venv-${{ env.CACHE_VERSION }}-${{
34+ hashFiles('pyproject.toml', 'requirements_test.txt',
35+ 'requirements_test_min.txt', 'requirements_test_brain.txt',
36+ 'requirements_test_pre_commit.txt') }}" >> $GITHUB_OUTPUT
3437 - name : Restore Python virtual environment
3538 id : cache-venv
36- 39+ uses :
actions/[email protected] .11 3740 with :
3841 path : venv
3942 key : >-
4043 ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
4144 steps.generate-python-key.outputs.key }}
42- restore-keys : |
43- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-base-venv-${{ env.CACHE_VERSION }}-
4445 - name : Create Python virtual environment
4546 if : steps.cache-venv.outputs.cache-hit != 'true'
4647 run : |
4748 python -m venv venv
4849 . venv/bin/activate
4950 python -m pip install -U pip setuptools wheel
5051 pip install -U -r requirements_test.txt -r requirements_test_brain.txt
51- pip install -e .
5252 - name : Generate pre-commit restore key
5353 id : generate-pre-commit-key
5454 run : >-
55- echo "::set-output name= key:: pre-commit-${{ env.CACHE_VERSION }}-${{
56- hashFiles('.pre-commit-config.yaml') }}"
55+ echo "key= pre-commit-${{ env.CACHE_VERSION }}-${{
56+ hashFiles('.pre-commit-config.yaml') }}" >> $GITHUB_OUTPUT
5757 - name : Restore pre-commit environment
5858 id : cache-precommit
59- 59+ uses :
actions/[email protected] .11 6060 with :
6161 path : ${{ env.PRE_COMMIT_CACHE }}
6262 key : >-
6363 ${{ runner.os }}-${{ steps.generate-pre-commit-key.outputs.key }}
64- restore-keys : |
65- ${{ runner.os }}-pre-commit-${{ env.CACHE_VERSION }}-
6664 - name : Install pre-commit dependencies
6765 if : steps.cache-precommit.outputs.cache-hit != 'true'
6866 run : |
7169 - name : Run pre-commit checks
7270 run : |
7371 . venv/bin/activate
74- pip install -e .
7572 pre-commit run pylint --all-files
7673
7774 tests-linux :
@@ -81,37 +78,37 @@ jobs:
8178 strategy :
8279 fail-fast : false
8380 matrix :
84- python-version : [3.7, 3.8, 3.9, "3.10", "3.11-dev "]
81+ python-version : [3.7, 3.8, 3.9, "3.10", "3.11"]
8582 outputs :
8683 python-key : ${{ steps.generate-python-key.outputs.key }}
8784 steps :
8885 - name : Check out code from GitHub
89- uses : actions/checkout@v3.0.2
86+ uses : actions/checkout@v3.1.0
9087 - name : Set up Python ${{ matrix.python-version }}
9188 id : python
92- uses : actions/setup-python@v4.2 .0
89+ uses : actions/setup-python@v4.3 .0
9390 with :
9491 python-version : ${{ matrix.python-version }}
92+ check-latest : true
9593 - name : Install Qt
9694 if : ${{ matrix.python-version == '3.10' }}
9795 run : |
9896 sudo apt-get install build-essential libgl1-mesa-dev
9997 - name : Generate partial Python venv restore key
10098 id : generate-python-key
10199 run : >-
102- echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
103- hashFiles('setup.cfg', 'requirements_test.txt', 'requirements_test_min.txt',
104- 'requirements_test_brain.txt') }}"
100+ echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
101+ hashFiles('pyproject.toml', 'requirements_test.txt',
102+ 'requirements_test_min.txt', 'requirements_test_brain.txt') }}" >>
103+ $GITHUB_OUTPUT
105104 - name : Restore Python virtual environment
106105 id : cache-venv
107- 106+ uses :
actions/[email protected] .11 108107 with :
109108 path : venv
110109 key : >-
111110 ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
112111 steps.generate-python-key.outputs.key }}
113- restore-keys : |
114- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-
115112 - name : Create Python virtual environment
116113 if : steps.cache-venv.outputs.cache-hit != 'true'
117114 run : |
@@ -125,7 +122,7 @@ jobs:
125122 . venv/bin/activate
126123 pytest --cov --cov-report= tests/
127124 - name : Upload coverage artifact
128- 125+ 129126 with :
130127 name : coverage-${{ matrix.python-version }}
131128 path : .coverage
@@ -142,15 +139,16 @@ jobs:
142139 COVERAGERC_FILE : .coveragerc
143140 steps :
144141 - name : Check out code from GitHub
145- uses : actions/checkout@v3.0.2
142+ uses : actions/checkout@v3.1.0
146143 - name : Set up Python ${{ matrix.python-version }}
147144 id : python
148- uses : actions/setup-python@v4.2 .0
145+ uses : actions/setup-python@v4.3 .0
149146 with :
150147 python-version : ${{ matrix.python-version }}
148+ check-latest : true
151149 - name : Restore Python virtual environment
152150 id : cache-venv
153- 151+ uses :
actions/[email protected] .11 154152 with :
155153 path : venv
156154 key :
@@ -162,7 +160,7 @@ jobs:
162160 echo "Failed to restore Python venv from cache"
163161 exit 1
164162 - name : Download all coverage artifacts
165- 163+ 166164 - name : Combine coverage results
167165 run : |
168166 . venv/bin/activate
@@ -183,35 +181,34 @@ jobs:
183181 strategy :
184182 fail-fast : false
185183 matrix :
186- python-version : [3.7, 3.8, 3.9, "3.10", "3.11-dev "]
184+ python-version : [3.7, 3.8, 3.9, "3.10", "3.11"]
187185 steps :
188186 - name : Set temp directory
189187 run : echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
190188 # Workaround to set correct temp directory on Windows
191189 # https://github.com/actions/virtual-environments/issues/712
192190 - name : Check out code from GitHub
193- uses : actions/checkout@v3.0.2
191+ uses : actions/checkout@v3.1.0
194192 - name : Set up Python ${{ matrix.python-version }}
195193 id : python
196- uses : actions/setup-python@v4.2 .0
194+ uses : actions/setup-python@v4.3 .0
197195 with :
198196 python-version : ${{ matrix.python-version }}
197+ check-latest : true
199198 - name : Generate partial Python venv restore key
200199 id : generate-python-key
201200 run : >-
202- echo "::set-output name= key::venv -${{ env.CACHE_VERSION }}-${{
203- hashFiles('setup.cfg ', 'requirements_test_min.txt',
204- 'requirements_test_brain.txt') }}"
201+ echo "key=${{ env.KEY_PREFIX }} -${{ env.CACHE_VERSION }}-${{
202+ hashFiles('pyproject.toml ', 'requirements_test_min.txt',
203+ 'requirements_test_brain.txt') }}" >> $env:GITHUB_OUTPUT
205204 - name : Restore Python virtual environment
206205 id : cache-venv
207- 206+ uses :
actions/[email protected] .11 208207 with :
209208 path : venv
210209 key : >-
211210 ${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
212211 steps.generate-python-key.outputs.key }}
213- restore-keys : |
214- ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ env.CACHE_VERSION }}-
215212 - name : Create Python virtual environment
216213 if : steps.cache-venv.outputs.cache-hit != 'true'
217214 run : |
@@ -235,27 +232,27 @@ jobs:
235232 python-version : ["pypy3.7", "pypy3.8", "pypy3.9"]
236233 steps :
237234 - name : Check out code from GitHub
238- uses : actions/checkout@v3.0.2
235+ uses : actions/checkout@v3.1.0
239236 - name : Set up Python ${{ matrix.python-version }}
240237 id : python
241- uses : actions/setup-python@v4.2 .0
238+ uses : actions/setup-python@v4.3 .0
242239 with :
243240 python-version : ${{ matrix.python-version }}
241+ check-latest : true
244242 - name : Generate partial Python venv restore key
245243 id : generate-python-key
246244 run : >-
247- echo "::set-output name=key::venv-${{ env.CACHE_VERSION }}-${{
248- hashFiles('setup.cfg', 'requirements_test_min.txt') }}"
245+ echo "key=${{ env.KEY_PREFIX }}-${{ env.CACHE_VERSION }}-${{
246+ hashFiles('pyproject.toml', 'requirements_test_min.txt')
247+ }}" >> $GITHUB_OUTPUT
249248 - name : Restore Python virtual environment
250249 id : cache-venv
251- 250+ uses :
actions/[email protected] .11 252251 with :
253252 path : venv
254253 key : >-
255254 ${{ runner.os }}-${{ matrix.python-version }}-${{
256255 steps.generate-python-key.outputs.key }}
257- restore-keys : |
258- ${{ runner.os }}-${{ matrix.python-version }}-venv-${{ env.CACHE_VERSION }}-
259256 - name : Create Python virtual environment
260257 if : steps.cache-venv.outputs.cache-hit != 'true'
261258 run : |
0 commit comments