Skip to content

Commit a618b2c

Browse files
committed
ci updates
1 parent 0f6cba1 commit a618b2c

File tree

7 files changed

+41
-32
lines changed

7 files changed

+41
-32
lines changed

.github/workflows/ci.yml

+29-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
11
name: Test overpass-api-python-wrapper
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
410

511
jobs:
6-
build:
12+
test:
713
runs-on: ubuntu-latest
14+
815
strategy:
916
max-parallel: 5
1017
matrix:
11-
python-version: ["3.8", "3.9", "3.10", "3.11"]
18+
python-version: ["3.9", "3.10", "3.11"]
1219

1320
steps:
14-
- uses: actions/checkout@v1
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: ${{ matrix.python-version }}
19-
- name: Install dependencies
20-
run: |
21-
sudo apt-get install libgeos-dev
22-
python -m pip install --upgrade pip
23-
pip install tox tox-gh-actions
24-
- name: Test with tox
25-
run: tox
21+
- uses: actions/checkout@v3
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install Poetry
29+
run: |
30+
curl -sSL https://install.python-poetry.org | python3 -
31+
32+
- name: Install system dependencies
33+
run: sudo apt-get install -y libgeos-dev
34+
35+
- name: Install project dependencies
36+
run: poetry install --no-root --sync
37+
38+
- name: Run tests with tox
39+
run: poetry run tox

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ pip-log.txt
1414
docs/_build/
1515
Pipfile.lock
1616
venv/
17+
.tox

poetry.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ python = ">3.9, <3.12"
1313
osm2geojson = "^0.2.5"
1414
requests = "^2.32.3"
1515

16-
[tool.poetry.dev-dependencies]
17-
pytest = "^7.4.0"
18-
tox = "^4.6.3"
19-
2016
[tool.poetry.group.dev.dependencies]
17+
pytest = "^7.4.0"
2118
geojson = "^3.1.0"
22-
requests-mock = {extras = ["fixtures"], version = "^1.12.1"}
19+
requests-mock = { extras = ["fixtures"], version = "^1.12.1" }
2320
deepdiff = "^7.0.1"
21+
tox = "^4.17.1"
2422

2523
[build-system]
26-
requires = ["poetry-core"]
24+
requires = ["poetry-core>=1.0.0"]
2725
build-backend = "poetry.core.masonry.api"

requirements-dev.txt

-4
This file was deleted.

requirements.txt

-2
This file was deleted.

tox.ini

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[tox]
2-
envlist = py{38,39,310,311}
2+
envlist = py{39,310,311}
33
skip_missing_interpreters = true
44

55
[testenv]
6-
deps = -r requirements-dev.txt
7-
commands = python -m pytest
6+
allowlist_externals = poetry
7+
commands_pre =
8+
poetry install --no-root --sync
9+
commands =
10+
poetry run pytest tests/ --import-mode importlib
811

912
[gh-actions]
1013
python =
11-
3.8: py38
1214
3.9: py39
1315
3.10: py310
1416
3.11: py311

0 commit comments

Comments
 (0)