Skip to content

Commit

Permalink
Merge pull request #11 from webb-ben/admin-test
Browse files Browse the repository at this point in the history
Move admin test outside of docker example
  • Loading branch information
webb-ben authored Jan 3, 2024
2 parents 40fcfd1 + db95cff commit abd4a36
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 170 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,32 @@ jobs:
matrix:
include:
- python-version: 3.8

env:
PYGEOAPI_CONFIG: "tests/pygeoapi-test-config-admin.yml"
PYGEOAPI_OPENAPI: "tests/pygeoapi-test-openapi-admin.yml"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Setup Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Run pygeoapi with admin API ⚙️
run: |
cd docker/examples/admin
docker compose up -d --build
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gunicorn python3-gevent
version: 1.0
- name: Install requirements 📦
run: |
pip3 install -r requirements.txt
pip3 install -r requirements-dev.txt
pip3 install -r requirements-admin.txt
python3 setup.py install
- name: Run pygeoapi with admin API ⚙️
run: |
pygeoapi openapi generate ${PYGEOAPI_CONFIG} --output-file ${PYGEOAPI_OPENAPI}
gunicorn --bind 0.0.0.0:5000 \
--reload \
--reload-extra-file ${PYGEOAPI_CONFIG} \
pygeoapi.flask_app:APP &
- name: run integration tests ⚙️
run: |
pytest tests/test_admin_api.py
Expand Down
46 changes: 0 additions & 46 deletions docker/examples/admin/docker-compose.yml

This file was deleted.

115 changes: 0 additions & 115 deletions docker/examples/admin/entrypoint.sh

This file was deleted.

2 changes: 2 additions & 0 deletions requirements-admin.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
filelock
jsonpatch
gunicorn
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@

server:
bind:
host: ${HOST}
port: ${PORT}
url: ${HOST}:${PORT}
host: 0.0.0.0
port: 5000
url: http://localhost:5000
admin: true
mimetype: application/json; charset=UTF-8
encoding: utf-8
Expand Down Expand Up @@ -98,4 +98,4 @@ resources:
hello-world:
type: process
processor:
name: ${PYGEOAPI_PROCESS}
name: HelloWorld

0 comments on commit abd4a36

Please sign in to comment.