Skip to content

Commit

Permalink
ci: add Debian 12, remove Debian 10
Browse files Browse the repository at this point in the history
  • Loading branch information
bouttier committed Nov 10, 2023
1 parent 4609e1a commit 6ef43fa
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@ jobs:
strategy:
fail-fast: false
matrix:
debian-version: [ '10', '11' ]
sqlalchemy-version: [ '1.3', '1.4' ]
exclude:
- sqlalchemy-version: '1.3'
debian-version: '10'
debian-version: [ '11', '12' ]
sqlalchemy-version: [ '1.4' ]
include:
- debian-version: '10'
python-version: '3.7'
postgres-version: '11'
postgis-version: '2.5'
- debian-version: '11'
python-version: '3.9'
postgres-version: '13'
postgis-version: '3.2'
- debian-version: '12'
python-version: '3.11'
postgres-version: '15'
postgis-version: '3.3'

name: Debian ${{ matrix.debian-version}} - SQLAlchemy ${{ matrix.sqlalchemy-version }}

Expand All @@ -53,14 +50,9 @@ jobs:
--health-retries 5
steps:
- name: Add postgis_raster database extension
if: ${{ matrix.postgis-version >= 3 }}
run: |
psql -h localhost -U geouser -d refgeo -tc 'CREATE EXTENSION "postgis_raster";'
env:
PGPASSWORD: geopasswd
- name: Add database extensions
run: |
psql -h localhost -U geouser -d refgeo -tc 'CREATE EXTENSION "postgis_raster";'
psql -h localhost -U geouser -d refgeo -tc 'CREATE EXTENSION "hstore";'
psql -h localhost -U geouser -d refgeo -tc 'CREATE EXTENSION "uuid-ossp";'
psql -h localhost -U geouser -d refgeo -tc 'CREATE EXTENSION "pg_trgm";'
Expand All @@ -80,24 +72,12 @@ jobs:
sudo apt update
sudo apt install -y libgdal-dev
- name: Install dependencies
if: ${{ matrix.sqlalchemy-version == '1.3' }}
run: |
python -m pip install --upgrade pip
python -m pip install \
-e .[tests] \
-e dependencies/Utils-Flask-SQLAlchemy \
-e dependencies/Utils-Flask-SQLAlchemy-Geo \
'sqlalchemy>=1.3,<1.4' \
'flask-sqlalchemy<3'
- name: Install dependencies
if: ${{ matrix.sqlalchemy-version == '1.4' }}
run: |
python -m pip install --upgrade pip
python -m pip install \
-e .[tests] \
-e dependencies/Utils-Flask-SQLAlchemy \
-e dependencies/Utils-Flask-SQLAlchemy-Geo \
'sqlalchemy>=1.4,<2'
-e dependencies/Utils-Flask-SQLAlchemy-Geo
- name: Show database branches and dependencies
run: |
flask db status --dependencies
Expand All @@ -113,7 +93,7 @@ jobs:
run: |
pytest -v --cov --cov-report xml
- name: Upload coverage to Codecov
if: ${{ matrix.debian-version == '11' && matrix.sqlalchemy-version == '1.4' }}
if: ${{ matrix.debian-version == '12' && matrix.sqlalchemy-version == '1.4' }}
uses: codecov/codecov-action@v3
with:
flags: pytest

0 comments on commit 6ef43fa

Please sign in to comment.