Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobMiksch committed Aug 10, 2024
1 parent f5eb1b7 commit a373fa8
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,51 @@ jobs:
runs-on: ubuntu-latest
container:
image: qgis/qgis:3.34
services:
qgisserver:
image: qgis/qgis-server:3.38
env:
QGIS_USER: 1000
QGIS_SERVER_LOG_LEVEL: 0
QGIS_SERVER_PROJECT_CACHE_STRATEGY: periodic
QSA_HOST: qsa
QSA_PORT: 9999
volumes:
- ./sandbox/dem.tif:/dem.tif
- ./sandbox/data.gpkg:/data.gpkg
- ./sandbox/projects/qsa:/io/data
- ./qsa-plugin:/io/plugins/qsa
- ./sandbox/pg_service.conf:/etc/postgresql-common/pg_service.conf
postgres:
image: postgis/postgis:15-3.4-alpine
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_PASSWORD: qsa
POSTGRES_USER: qsa
POSTGRES_DB: qsa

steps:
- uses: actions/checkout@v4
- name: install system dependencies
run: apt update && apt install -y python3-poetry python3-flask python3-boto3
- name: Install Python dependencies
working-directory: qsa-api
run: poetry install
# TODO: check if Postgres is ready
- name: Run QSA Server
working-directory: qsa-api
run: |
gunicorn --bind 0.0.0.0:5000 \
--reload \
--workers 1 \
--threads 1 \
qsa_api.app:app &
- name: Run test without Postgres Dependency
working-directory: qsa-api
run: pytest -sv tests/test_api_storage_filesystem.py

0 comments on commit a373fa8

Please sign in to comment.