@@ -2,23 +2,61 @@ name: check
22
33on : push
44
5+ env :
6+ POETRY_VERSION : " 1.1.13"
7+
58jobs :
69 check :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ python-version : ["3.7", "3.8", "3.9", "3.10"]
14+
15+ steps :
16+ - uses : actions/checkout@v2
17+ - uses : actions/setup-python@v2
18+ with :
19+ python-version : ${{ matrix.python-version }}
20+ - name : Run image
21+ 22+ with :
23+ poetry-version : ${{ env.POETRY_VERSION }}
24+ - run : poetry config virtualenvs.in-project true
25+ - name : Set up cache
26+ uses : actions/cache@v2
27+ id : cache
28+ with :
29+ path : .venv
30+ key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
31+ - name : Ensure cache is healthy
32+ if : steps.cache.outputs.cache-hit == 'true'
33+ run : timeout 10s poetry run pip --version || rm -rf .venv
34+ - run : poetry install
35+ - run : poetry run mypy -p basedtyping -p tests
36+ - run : poetry run pytest tests/
37+
38+ lint :
739 runs-on : ubuntu-latest
840 steps :
941 - uses : actions/checkout@v2
1042 - uses : actions/setup-python@v2
1143 with :
12- python-version : " 3.10 "
44+ python-version : " 3.7 "
1345 - name : Run image
14461547 with :
16- poetry-version : " 1.1.12"
48+ poetry-version : ${{ env.POETRY_VERSION }}
49+ - run : poetry config virtualenvs.in-project true
50+ - name : Set up cache
51+ uses : actions/cache@v2
52+ id : cache
53+ with :
54+ path : .venv
55+ key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
56+ - name : Ensure cache is healthy
57+ if : steps.cache.outputs.cache-hit == 'true'
58+ run : timeout 10s poetry run pip --version || rm -rf .venv
1759 - run : poetry install
18- - run : poetry run mypy -p basedtyping
19- - run : poetry run mypy tests
2060 - run : poetry run black --check --diff .
2161 - run : poetry run isort --check --diff .
2262 - run : poetry run flake8 .
23- - run : poetry run pylint basedtyping tests
24- - run : poetry run pytest
0 commit comments