Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Mar 23, 2024
1 parent 39cee07 commit 15f4f72
Show file tree
Hide file tree
Showing 9 changed files with 290 additions and 18 deletions.
2 changes: 1 addition & 1 deletion tests/.env.example → .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MAIN SETTINGS FOR THE DOCKER COMPOSE STACK

# Change which dockerfiles to include. In production, make sure to only include docker-compose.yml
COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml
COMPOSE_FILE=tests/docker-compose.yml:tests/docker-compose.dev.yml

# Change this to the host name on which the stack is installed
OGCAPIF_HOST=0.0.0.0
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ on:
jobs:
benchmark:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tests
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
Expand Down Expand Up @@ -54,18 +51,18 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Download fixtures
run: ../scripts/download-fixtures.sh
run: scripts/download-fixtures.sh

- name: Start Django
run: |
docker compose up --build -d
docker compose exec django python manage.py migrate
- name: Run Benchmark
run: ./benchmark/time.sh ${{ inputs.size }}
run: .tests/benchmark/time.sh ${{ inputs.size }}

- name: Create plots
run: ./benchmark/plot.py
run: .tests/benchmark/plot.py

- uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ on:
jobs:
conformance:
runs-on: ubuntu-latest
defaults:
run:
working-directory: tests
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create env
run: cp .env.example .env

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ db.sqlite3
.DS_Store
*.pyc
__pycache__
tests/.env
.env
*.orig
build
dist
Expand Down
275 changes: 275 additions & 0 deletions tests/django_oapif_tests/tests/migrations/0001_initial.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions tests/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ services:

caddy:
volumes:
- ./docker/caddy:/etc/caddy
- ./tests/docker/caddy:/etc/caddy

django:
environment:
# live-reload, show exceptions in browser, etc.
DJANGO_DEBUG: "true"
volumes:
# mounting the source code for live reloading
- ./..:/usr/src
- ..:/usr/src
# mounting directory to hold unit tests outputs
- ./unit_tests_outputs/:/unit_tests_outputs
ports:
Expand Down
4 changes: 2 additions & 2 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:

caddy:
build:
context: docker/caddy
context: ./docker/caddy
volumes:
- caddy_data:/data
- static_volume:/static_volume
Expand All @@ -22,7 +22,7 @@ services:
image: opengisch/django-oapif:latest
build:
context: ..
dockerfile: tests/docker/django/Dockerfile
dockerfile: ./tests/docker/django/Dockerfile
cache_from:
- opengisch/django-oapif:latest
restart: unless-stopped
Expand Down
6 changes: 6 additions & 0 deletions tests/docker/django/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ RUN apt-get update && \
gettext \
graphviz

COPY requirements-dev.txt .
COPY requirements.txt .

RUN pip install -r requirements-dev.txt
RUN pip install -r requirements.txt

COPY . /usr/src/

RUN pip install /usr/src/.[dev]
Expand Down

0 comments on commit 15f4f72

Please sign in to comment.