1313 POETRY_CONFIG_DIR : /opt/poetry
1414 POETRY_CACHE_DIR : /opt/poetry/cache
1515 POETRY_VIRTUALENVS_PATH : /opt/poetry/store
16+ DEFAULT_PYTHON : ' 3.10'
1617
1718jobs :
1819 # This job checks if an identical workflow is being triggered by different
4849 uses : actions/cache@v3
4950 with :
5051 path : ${{ env.POETRY_HOME }}
51- key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('./pyproject.toml') }}-{{ hashFiles('./poetry.lock') }}
52+ key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('./pyproject.toml') }}-$ {{ hashFiles('./poetry.lock') }}
5253 - name : Install package
5354 run : make install
5455 if : steps.cached-poetry.outputs.cache-hit != 'true'
@@ -58,15 +59,15 @@ jobs:
5859
5960 steps :
6061 - uses : actions/checkout@v3
61- - name : Set up Python 3.9
62+ - name : Set up Python ${{ env.DEFAULT_PYTHON }}
6263 uses : actions/setup-python@v4
6364 with :
64- python-version : 3.9
65+ python-version : ${{ env.DEFAULT_PYTHON }}
6566 - name : Load Poetry cache
6667 uses : actions/cache@v3
6768 with :
6869 path : ${{ env.POETRY_HOME }}
69- key : ${{ runner.os }}-3.9 -${{ hashFiles('./pyproject.toml') }}-{{ hashFiles('./poetry.lock') }}
70+ key : ${{ runner.os }}-${{ env.DEFAULT_PYTHON }} -${{ hashFiles('./pyproject.toml') }}-$ {{ hashFiles('./poetry.lock') }}
7071 - name : Build wheel
7172 run : make build
7273 - name : Archive build artifacts
@@ -81,15 +82,15 @@ jobs:
8182
8283 steps :
8384 - uses : actions/checkout@v3
84- - name : Set up Python 3.9
85+ - name : Set up Python ${{ env.DEFAULT_PYTHON }}
8586 uses : actions/setup-python@v4
8687 with :
87- python-version : 3.9
88+ python-version : ${{ env.DEFAULT_PYTHON }}
8889 - name : Load Poetry cache
8990 uses : actions/cache@v3
9091 with :
9192 path : ${{ env.POETRY_HOME }}
92- key : ${{ runner.os }}-3.9 -${{ hashFiles('./pyproject.toml') }}-{{ hashFiles('./poetry.lock') }}
93+ key : ${{ runner.os }}-${{ env.DEFAULT_PYTHON }} -${{ hashFiles('./pyproject.toml') }}-$ {{ hashFiles('./poetry.lock') }}
9394 - name : Run metrics checks
9495 run : make metrics
9596 unit-tests :
@@ -110,7 +111,7 @@ jobs:
110111 uses : actions/cache@v3
111112 with :
112113 path : ${{ env.POETRY_HOME }}
113- key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('./pyproject.toml') }}-{{ hashFiles('./poetry.lock') }}
114+ key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('./pyproject.toml') }}-$ {{ hashFiles('./poetry.lock') }}
114115 - name : Run unit tests
115116 run : make unit-test
116117 integration-tests :
@@ -131,7 +132,7 @@ jobs:
131132 uses : actions/cache@v3
132133 with :
133134 path : ${{ env.POETRY_HOME }}
134- key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('./pyproject.toml') }}-{{ hashFiles('./poetry.lock') }}
135+ key : ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('./pyproject.toml') }}-$ {{ hashFiles('./poetry.lock') }}
135136 - name : Run integration tests
136137 run : make integration-test
137138 coverage :
@@ -140,14 +141,31 @@ jobs:
140141
141142 steps :
142143 - uses : actions/checkout@v3
143- - name : Set up Python 3.9
144+ - name : Set up Python ${{ env.DEFAULT_PYTHON }}
144145 uses : actions/setup-python@v4
145146 with :
146- python-version : 3.9
147+ python-version : ${{ env.DEFAULT_PYTHON }}
147148 - name : Load Poetry cache
148149 uses : actions/cache@v3
149150 with :
150151 path : ${{ env.POETRY_HOME }}
151- key : ${{ runner.os }}-3.9 -${{ hashFiles('./pyproject.toml') }}-{{ hashFiles('./poetry.lock') }}
152+ key : ${{ runner.os }}-${{ env.DEFAULT_PYTHON }} -${{ hashFiles('./pyproject.toml') }}-$ {{ hashFiles('./poetry.lock') }}
152153 - name : Run coverage
153- run : make coverage
154+ run : make coverage
155+ mypy :
156+ needs : install
157+ runs-on : ubuntu-latest
158+
159+ steps :
160+ - uses : actions/checkout@v3
161+ - name : Set up Python ${{ env.DEFAULT_PYTHON }}
162+ uses : actions/setup-python@v4
163+ with :
164+ python-version : ${{ env.DEFAULT_PYTHON }}
165+ - name : Load Poetry cache
166+ uses : actions/cache@v3
167+ with :
168+ path : ${{ env.POETRY_HOME }}
169+ key : ${{ runner.os }}-${{ env.DEFAULT_PYTHON }}-${{ hashFiles('./pyproject.toml') }}-${{ hashFiles('./poetry.lock') }}
170+ - name : Run mypy checks
171+ run : make mypy
0 commit comments