Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chores] Formatted code, updated CI, update deps #303

Merged
merged 8 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ updates:
interval: "monthly"
commit-message:
prefix: "[deps] "
- package-ecosystem: "github-actions" # Check for GitHub Actions updates
directory: "/"
schedule:
interval: "monthly" # Check for updates weekly
commit-message:
prefix: "[ci] "
124 changes: 56 additions & 68 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

services:
postgres:
image: postgis/postgis:10-2.5
image: postgis/postgis:15-3.4-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
Expand All @@ -29,97 +29,85 @@ jobs:
fail-fast: false
matrix:
env:
- python: 3.6
TOXENV: py36-django22-djangorestframework310
- python: 3.7
TOXENV: py37-django22-djangorestframework310
- python: 3.8
TOXENV: py38-django22-djangorestframework310
- python: 3.9
TOXENV: py39-django22-djangorestframework310
- python: 3.6
TOXENV: py36-django22-djangorestframework312
- python: 3.7
TOXENV: py37-django22-djangorestframework312
- python: 3.8
TOXENV: py38-django22-djangorestframework312
- python: 3.9
TOXENV: py39-django22-djangorestframework312
- python: 3.6
TOXENV: py36-django30-djangorestframework312
- python: 3.7
TOXENV: py37-django30-djangorestframework312
- python: 3.8
TOXENV: py38-django30-djangorestframework312
- python: 3.9
TOXENV: py39-django30-djangorestframework312
- python: 3.6
TOXENV: py36-django31-djangorestframework312
- python: 3.7
TOXENV: py37-django31-djangorestframework312
- python: 3.8
TOXENV: py38-django31-djangorestframework312
- python: 3.9
TOXENV: py39-django31-djangorestframework312
- python: 3.7
TOXENV: py37-django32-djangorestframework312
- python: 3.8
- python: '3.8'
TOXENV: py38-django32-djangorestframework312
- python: 3.9
- python: '3.8'
TOXENV: py38-django32-djangorestframework313
- python: '3.8'
TOXENV: py38-django32-djangorestframework314
- python: '3.8'
TOXENV: py38-django42-djangorestframework314
- python: '3.9'
TOXENV: py39-django32-djangorestframework312
- python: 3.8
TOXENV: py38-django40-djangorestframework313
- python: 3.9
TOXENV: py39-django40-djangorestframework313
- python: '3.9'
TOXENV: py39-django32-djangorestframework313
- python: '3.9'
TOXENV: py39-django32-djangorestframework314
- python: '3.9'
TOXENV: py39-django42-djangorestframework314
- python: '3.10'
TOXENV: py310-django32-djangorestframework312
- python: '3.10'
TOXENV: py310-django32-djangorestframework313
- python: '3.10'
TOXENV: py310-django32-djangorestframework314
- python: '3.10'
TOXENV: py310-django42-djangorestframework314
- python: '3.11'
TOXENV: py311-django42-djangorestframework314
- python: '3.11'
TOXENV: py311-django50-djangorestframework315
- python: '3.12'
TOXENV: py312-django50-djangorestframework315
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python ${{ matrix.env.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.env.python }}
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt

- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install binutils libproj-dev gdal-bin -y

- name: Install python dependencies
- name: Install Dependencies
id: deps
run: |
sudo apt -qq update
sudo apt -qq -y install binutils libproj-dev gdal-bin
pip install -U pip wheel setuptools
pip install -U -r requirements-test.txt
pip install tox docutils pygments twine

- name: QA checks
run: |
./run-qa-checks

- name: Tests
if: ${{ !cancelled() && steps.deps.conclusion == 'success' }}
run: |
tox -e ${{ matrix.env.TOXENV }}
coverage combine
coverage xml
env:
POSTGRES_HOST: localhost

- name: Upload Coverage
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: |
python-${{ matrix.env.env }}
COVERALLS_PARALLEL: true

- name: QA checks
run: |
pip install "importlib-metadata<5.0" # remove when flake8 is upgraded
./run-qa-checks
if: ${{ success() }}
uses: coverallsapp/github-action@v2
with:
parallel: true
format: cobertura
flag-name: python-${{ matrix.env.env }}
github-token: ${{ secrets.GITHUB_TOKEN }}

coveralls:
name: Finish Coveralls
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
Loading