File tree Expand file tree Collapse file tree 2 files changed +53
-3
lines changed Expand file tree Collapse file tree 2 files changed +53
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Tests
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ python-version : [3.8, 3.9]
17+ steps :
18+ - uses : actions/checkout@v2
19+ - name : Set up Python ${{ matrix.python-version }}
20+ uses : actions/setup-python@v2
21+ with :
22+ python-version : ${{ matrix.python-version }}
23+ - name : Install Poetry
24+ uses : snok/install-poetry@v1.1.1
25+ with :
26+ version : 1.1.4
27+ virtualenvs-create : true
28+ virtualenvs-in-project : true
29+ - name : Load cached venv
30+ id : cached-poetry-dependencies
31+ uses : actions/cache@v2
32+ with :
33+ path : .venv
34+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
35+ - name : Install dependencies
36+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
37+ run : poetry install --no-interaction --no-root
38+ - name : Install library
39+ run : poetry install --no-interaction
40+ - name : Linting
41+ run : |
42+ poetry run tox -e isort-check
43+ poetry run tox -e black-check
44+ - name : Run tests
45+ env :
46+ TOX_ENV : py${{ matrix.python-version }}
47+ run : |
48+ poetry run tox -e $TOX_ENV
Original file line number Diff line number Diff line change 11[tox]
22isolated_build = True
33skipsdist = True
4- envlist = py39,py38
4+ envlist = py3.9,py3.8
55requires =
66 tox-poetry-dev-dependencies
77
88[tox:.package]
99# note tox will use the same python version as under what tox is installed to package
1010# so unless this is python 3 you can require a given python version for the packaging
1111# environment via the basepython key
12- basepython = python3
12+ basepython =
13+ py3.9: python3.9
14+ py3.8: python3.8
1315
1416[testenv:isort-check]
1517commands = isort -c --diff clerk/ tests/
@@ -18,7 +20,7 @@ commands = isort -c --diff clerk/ tests/
1820commands = black --check clerk/ tests/
1921
2022[testenv]
21- env =
23+ setenv =
2224 PYTHONHASHSEED = 1
2325deps = .
2426commands = pytest {posargs}
You can’t perform that action at this time.
0 commit comments