1212
1313env :
1414 CACHE_VERSION : 1
15- DEFAULT_PYTHON : 3.7
15+ DEFAULT_PYTHON : 3.8
1616
1717jobs :
1818 lint-flake8 :
@@ -28,17 +28,18 @@ jobs:
2828 with :
2929 python-version : ${{ env.DEFAULT_PYTHON }}
3030
31- - name : Restore Python ${{ env.DEFAULT_PYTHON }} virtual environment
31+ - name : Restore Python ${{ steps.python.outputs.python-version }} virtual environment
3232 id : cache-venv
33- uses : actions/cache@v3.3.1
33+ uses : actions/cache@v3
3434 with :
3535 path : venv
3636 key : >-
3737 ${{ env.CACHE_VERSION }}-${{ runner.os }}-venv-${{
3838 steps.python.outputs.python-version }}-${{
3939 hashFiles('requirements_dev.txt') }}
40- restore-keys : |
41- ${{ env.CACHE_VERSION }}-${{ runner.os }}-venv-${{ steps.python.outputs.python-version }}-
40+ restore-keys : >-
41+ ${{ env.CACHE_VERSION }}-${{ runner.os }}-venv-${{
42+ steps.python.outputs.python-version }}-
4243
4344 - name : Create Python virtual environment
4445 if : steps.cache-venv.outputs.cache-hit != 'true'
5960
6061
6162 pytest :
62- name : pytest ${{ matrix.python-version }} (${{ matrix.plex }})
63+ name : pytest (${{ matrix.plex }})
6364 needs : lint-flake8
6465 runs-on : ubuntu-latest
6566 env :
7071 fail-fast : false
7172 max-parallel : 3
7273 matrix :
73- python-version : [3.7]
7474 plex : ['unclaimed', 'claimed']
7575 is-master :
7676 - ${{ github.ref == 'refs/heads/master' }}
@@ -81,23 +81,24 @@ jobs:
8181 - name : Check out code from Github
8282 uses : actions/checkout@v3
8383
84- - name : Set up Python ${{ matrix.python-version }}
84+ - name : Set up Python ${{ env.DEFAULT_PYTHON }}
8585 id : python
8686 uses : actions/setup-python@v4
8787 with :
88- python-version : ${{ matrix.python-version }}
88+ python-version : ${{ env.DEFAULT_PYTHON }}
8989
90- - name : Restore Python ${{ matrix .python-version }} virtual environment
90+ - name : Restore Python ${{ steps.python.outputs .python-version }} virtual environment
9191 id : cache-venv
92- uses : actions/cache@v3.3.1
92+ uses : actions/cache@v3
9393 with :
9494 path : venv
9595 key : >-
9696 ${{ env.CACHE_VERSION }}-${{ runner.os }}-venv-${{
9797 steps.python.outputs.python-version }}-${{
9898 hashFiles('requirements_dev.txt') }}
99- restore-keys : |
100- ${{ env.CACHE_VERSION }}-${{ runner.os }}-venv-${{ steps.python.outputs.python-version }}-
99+ restore-keys : >-
100+ ${{ env.CACHE_VERSION }}-${{ runner.os }}-venv-${{
101+ steps.python.outputs.python-version }}-
101102
102103 - name : Create Python virtual environment
103104 if : steps.cache-venv.outputs.cache-hit != 'true'
@@ -129,7 +130,7 @@ jobs:
129130
130131 - name : Cache PMS Docker image
131132 id : docker-cache
132- uses : actions/cache@v3.3.1
133+ uses : actions/cache@v3
133134 with :
134135 path : ~/.cache/docker/plexinc
135136 key : ${{ runner.os }}-docker-pms-${{ steps.docker-digest.outputs.digest }}
@@ -184,7 +185,7 @@ jobs:
184185 - name : Upload coverage artifact
185186 uses : actions/upload-artifact@v3
186187 with :
187- name : coverage-${{ matrix.plex }}-${{ matrix .python-version }}
188+ name : coverage-${{ matrix.plex }}-${{ steps.python.outputs .python-version }}
188189 path : .coverage
189190
190191
@@ -211,23 +212,19 @@ jobs:
211212 with :
212213 python-version : ${{ env.DEFAULT_PYTHON }}
213214
214- - name : Restore Python ${{ env.DEFAULT_PYTHON }} virtual environment
215+ - name : Restore Python ${{ steps.python.outputs.python-version }} virtual environment
215216 id : cache-venv
216- uses : actions/cache@v3.3.1
217+ uses : actions/cache@v3
217218 with :
218219 path : venv
219220 key : >-
220- ${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{
221+ ${{ env.CACHE_VERSION }}-${{ runner.os }}-venv-${{
221222 steps.python.outputs.python-version }}-${{
222223 hashFiles('requirements_dev.txt') }}
223- restore-keys : |
224- ${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{ steps.python.outputs.python-version }}-
225-
226- - name : Fail job if Python cache restore failed
227- if : steps.cache-venv.outputs.cache-hit != 'true'
228- run : |
229- echo "Failed to restore Python virtual environment from cache"
230- exit 1
224+ restore-keys : >-
225+ ${{ env.CACHE_VERSION }}-${{ runner.os }}-venv-${{
226+ steps.python.outputs.python-version }}-
227+ fail-on-cache-miss : true
231228
232229 - name : Download all coverage artifacts
233230 uses : actions/download-artifact@v3
@@ -240,6 +237,6 @@ jobs:
240237 coverage xml
241238
242239 - name : Upload ${{ matrix.plex }} coverage to Codecov
243- uses : codecov/codecov-action@v3.1.4
240+ uses : codecov/codecov-action@v3
244241 with :
245242 flags : ${{ matrix.plex }}
0 commit comments