Bump importlib-metadata from 6.8.0 to 8.2.0 (#160) #274
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
DATABASE_USER: postgres | |
DATABASE_PASSWORD: postgres | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install package dependencies | |
run: | | |
sudo apt-get install -y gdal-bin | |
- name: install poetry | |
run: | | |
pip install pipx && pipx install poetry~=1.6 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: install python dependencies | |
run: | | |
poetry install --no-interaction | |
- name: run linters via pre-commit | |
run: | | |
poetry run pre-commit run --all --show-diff-on-failure --color=always | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
django-version: ["4.2", "5.0"] | |
postgres-version: ["12-2.5", "13-3.4"] | |
exclude: | |
- django-version: "5.0" | |
python-version: "3.8" | |
- django-version: "5.0" | |
postgres-version: "12-2.5" | |
- django-version: "5.0" | |
python-version: "3.9" | |
services: | |
postgresql: | |
image: postgis/postgis:${{ matrix.postgres-version }} | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: heroku_connect_test | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install package dependencies | |
run: | | |
sudo apt-get install -y gdal-bin | |
- name: install poetry | |
run: | | |
pip install pipx && pipx install poetry | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install python dependencies | |
run: | | |
poetry install --no-interaction | |
- name: override initial django installation | |
run: | | |
poetry run pip install Django~=${{ matrix.django-version }} | |
- name: run tests | |
run: | | |
poetry run coverage run --source=heroku_connect -m 'pytest' | |
poetry run coverage xml | |
- name: upload coverage to codecov | |
if: ${{ !github.event.pull_request.head.repo.fork && !(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]') }} | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: false | |
files: coverage.xml |