File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed
Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,37 @@ jobs:
240240 name : coverage-${{ matrix.python-version }}
241241 path : .coverage
242242
243+ mypy :
244+ runs-on : ubuntu-latest
245+ name : Run mypy using Python ${{ env.DEFAULT_PYTHON }}
246+ needs : pytest
247+ steps :
248+ - name : Check out committed code
249+ uses : actions/checkout@v3
250+ - name : Set up Python ${{ env.DEFAULT_PYTHON }}
251+ id : python
252+ uses : actions/setup-python@v3
253+ with :
254+ python-version : ${{ env.DEFAULT_PYTHON }}
255+ - name : Restore full Python ${{ env.DEFAULT_PYTHON }} virtual environment
256+ id : cache-venv
257+ uses : actions/cache@v3
258+ with :
259+ path : venv
260+ key : >-
261+ ${{ env.CACHE_VERSION}}-${{ runner.os }}-venv-${{ env.DEFAULT_PYTHON
262+ }}-${{ hashFiles('requirements_test.txt')
263+ }}-${{ hashFiles('setup.py') }}
264+ - name : Fail job if Python cache restore failed
265+ if : steps.cache-venv.outputs.cache-hit != 'true'
266+ run : |
267+ echo "Failed to restore Python virtual environment from cache"
268+ exit 1
269+ - name : Run all tests
270+ run : |
271+ . venv/bin/activate
272+ mypy plugwise/
273+
243274 shellcheck :
244275 name : Shellcheck
245276 runs-on : ubuntu-latest
@@ -251,7 +282,7 @@ jobs:
251282 coverage :
252283 name : Process test coverage
253284 runs-on : ubuntu-latest
254- needs : pytest
285+ needs : mpyp
255286 steps :
256287 - name : Check out code from GitHub
257288 uses : actions/checkout@v3
You can’t perform that action at this time.
0 commit comments