Skip to content

Commit

Permalink
ci: fix-tox-tests (#153)
Browse files Browse the repository at this point in the history
* fix: modified tox.ini file

* ci: added python3.11

* chore: changed python version to 3.11 in ci builds

* chore: cleaned tox file

* ci: added restore keys for tox cache
  • Loading branch information
RaczeQ authored Jan 3, 2023
1 parent f1078a4 commit 1718287
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- os: macos-latest
python-version: "3.10"
python-version: "3.11"
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }}
Expand All @@ -38,5 +38,7 @@ jobs:
with:
path: .tox
key: tox-cache-${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pdm.lock') }}
restore-keys: |
tox-cache-${{ matrix.os }}-${{ matrix.python-version }}-
- name: Run tests with tox
run: pdm run tox -e python${{ matrix.python-version }}
6 changes: 3 additions & 3 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- uses: pdm-project/setup-pdm@v3
name: Setup PDM
with:
python-version: 3.8
python-version: 3.11
architecture: x64
enable-pep582: true
cache: true
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v3
with:
path: ~/.cache/pip
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- uses: pdm-project/setup-pdm@v3
name: Setup PDM
with:
python-version: 3.8
python-version: 3.11
architecture: x64
enable-pep582: true
cache: true
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- uses: actions/cache@v3
with:
path: ~/.cache/pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-manual-pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --hook-stage manual
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: Unix",
"Operating System :: MacOS",
]
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ envlist =
python3.8
python3.9
python3.10
python3.11
report
isolated_build = True
skip_missing_interpreters = True

[testenv]
setenv =
python3.{8,9,10}: COVERAGE_FILE = .coverage.{envname}
deps =
.[osm, voronoi]
python3.{8,9,10,11}: COVERAGE_FILE = .coverage.{envname}
groups =
all
test
commands =
pytest --cov --cov-append --cov-report=term-missing tests/

depends =
report: python3.8,python3.9,python3.10
report: python3.8,python3.9,python3.10,python3.11

[testenv:report]
deps = coverage
Expand Down

0 comments on commit 1718287

Please sign in to comment.