Skip to content

Merge branch 'main' of https://github.com/Aareon/python-geonames #2

Merge branch 'main' of https://github.com/Aareon/python-geonames

Merge branch 'main' of https://github.com/Aareon/python-geonames #2

Workflow file for this run

name: Python tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"] # Adjusted based on pyproject.toml
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: |
poetry install --no-interaction --with test,develop
- name: Run tests with pytest
run: |
poetry run pytest --cov=geonames tests/ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: true