Skip to content

Commit

Permalink
ci updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mvexel committed Aug 10, 2024
1 parent 0f6cba1 commit a618b2c
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 32 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
name: Test overpass-api-python-wrapper

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
test:
runs-on: ubuntu-latest

strategy:
max-parallel: 5
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get install libgeos-dev
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install system dependencies
run: sudo apt-get install -y libgeos-dev

- name: Install project dependencies
run: poetry install --no-root --sync

- name: Run tests with tox
run: poetry run tox
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ pip-log.txt
docs/_build/
Pipfile.lock
venv/
.tox
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ python = ">3.9, <3.12"
osm2geojson = "^0.2.5"
requests = "^2.32.3"

[tool.poetry.dev-dependencies]
pytest = "^7.4.0"
tox = "^4.6.3"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
geojson = "^3.1.0"
requests-mock = {extras = ["fixtures"], version = "^1.12.1"}
requests-mock = { extras = ["fixtures"], version = "^1.12.1" }
deepdiff = "^7.0.1"
tox = "^4.17.1"

[build-system]
requires = ["poetry-core"]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
4 changes: 0 additions & 4 deletions requirements-dev.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[tox]
envlist = py{38,39,310,311}
envlist = py{39,310,311}
skip_missing_interpreters = true

[testenv]
deps = -r requirements-dev.txt
commands = python -m pytest
allowlist_externals = poetry
commands_pre =
poetry install --no-root --sync
commands =
poetry run pytest tests/ --import-mode importlib

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311

0 comments on commit a618b2c

Please sign in to comment.