@@ -14,60 +14,56 @@ jobs:
1414 strategy :
1515 fail-fast : false
1616 matrix :
17- python-version : [ "3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.8", "pypy3.9" ]
18- poetry-version : [ "latest" ]
19- os : [ ubuntu-20.04, macos-latest, windows-latest ]
17+ config :
18+ - python-version : ' 3.11'
19+ tox : py311
20+ poetry-version : [ "1.8.2" ]
21+ os : [ ubuntu-22.04, macos-latest, windows-latest ]
2022 runs-on : ${{ matrix.os }}
21- name : Python ${{ matrix.python-version }} / Poetry ${{ matrix.poetry-version }} / ${{ matrix.os }}
23+ name : Python ${{ matrix.config. python-version }} / Poetry ${{ matrix.poetry-version }} / ${{ matrix.os }}
2224 defaults :
2325 run :
2426 shell : bash
2527 steps :
2628 - uses : actions/checkout@v3
2729 with :
2830 fetch-depth : 0
29- - name : Set up Python ${{ matrix.python-version }}
30- uses : actions/setup-python@v4
31+ - uses : actions/checkout@v4
32+ - name : Install poetry
33+ run : pipx install poetry
34+ - name : Install Python ${{ matrix.config.python-version }}
35+ uses : actions/setup-python@v5
3136 with :
32- python-version : ${{ matrix.python-version }}
33- cache : ' pip'
34- - name : Update pip
35- run : |
36- python -m pip install --upgrade pip
37- - name : Run Poetry action
38- uses : abatilo/actions-poetry@v2
39- with :
40- poetry-version : ${{ matrix.poetry-version }}
41- - name : View poetry --version
42- run : poetry --version
43- - name : Install dependencies
44- run : poetry install
45- - name : Run tests
46- run : poetry run pytest
47- - name : Upload coverage to Codecov
48- uses : codecov/codecov-action@v1
37+ python-version : ${{ matrix.config.python-version }}
38+ cache : ' poetry'
39+ - name : Install packages
40+ run : poetry install --no-root
41+ - name : Load cached tox
42+ uses : actions/cache@v3
4943 with :
50- token : ${{ secrets.CODECOV_TOKEN }}
51- flags : unittests
52- env_vars : OS,PYTHON
53- name : codecov-umbrella
54- fail_ci_if_error : true
55- verbose : true
44+ path : .tox
45+ key : tox-${{ matrix.os }}-poetry-${{ matrix.poetry-version }}-python-${{ matrix.config.python-version }}-${{ hashFiles('**/poetry.lock') }}
46+ - name : Setup API Key
47+ env :
48+ ORS_API_KEY : ${{ secrets.ORS_API_KEY }}
49+ run : printf "[ORS]\napiKey = $ORS_API_KEY\n" > tests-config.ini
50+ - name : Run tox
51+ run : |
52+ poetry run tox -e pytest-${{ matrix.config.tox }}
53+
5654 build-and-publish :
5755 name : Build and publish Python distributions 📦 to PyPI and TestPyPI
5856 runs-on : ubuntu-20.04
59- needs :
60- - pytest
57+ needs : pytest
6158 steps :
62- - uses : actions/checkout@v2
63- - name : Set up base Python 3.9
64- uses : actions/setup-python@v2
65- with :
66- python-version : 3.9
67- - name : Python Poetry Action
68- uses : abatilo/actions-poetry@v2
59+ - uses : actions/checkout@v4
60+ - name : Install poetry
61+ run : pipx install poetry
62+ - name : Install Python ${{ matrix.config.python-version }}
63+ uses : actions/setup-python@v5
6964 with :
70- poetry-version : latest
65+ python-version : ${{ matrix.config.python-version }}
66+ cache : ' poetry'
7167 - name : Publish distribution 📦 with test.pypi.org
7268 if : startsWith(github.ref, 'refs/tags/v')
7369 run : |
0 commit comments