Skip to content

make app installable + reorganize code + update requirements #91

make app installable + reorganize code + update requirements

make app installable + reorganize code + update requirements #91

Workflow file for this run

name: Benchmark
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
size:
description: 'number of features to load'
required: true
default: 100
type: number
push:
branches:
- main
pull_request:
branches:
- main
jobs:
benchmark:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
steps:
- uses: actions/checkout@v4
- name: Create env
run: cp .env.example .env
- name: Load .env file
uses: xom9ikk/dotenv@v2
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install deps
run: |
sudo apt-get install -y jq
pip install plotly kaleido
# hyperfine for timing
HF_VERSION=1.18.0
wget https://github.com/sharkdp/hyperfine/releases/download/v${HF_VERSION}/hyperfine_${HF_VERSION}_amd64.deb
sudo dpkg -i hyperfine_${HF_VERSION}_amd64.deb
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Django image
uses: docker/build-push-action@v5
with:
context: .
provenance: false
file: docker/django_oapif_tests/Dockerfile
pull: true
cache-from: type=registry,ref=opengisch/django_oapif_tests-oapif:latest
tags: opengisch/django_oapif_tests-oapif:latest
- name: Download fixtures
run: ./scripts/download-fixtures.sh
- name: Start Django
run: ./scripts/restart.sh
- name: Run Benchmark
run: ./tests/benchmark/time.sh ${{ inputs.size }}
- name: Create plots
run: ./tests/benchmark/plot.py
- uses: actions/upload-artifact@v4
with:
path: |
tests/benchmark/results/benchmark.dat
tests/benchmark/results/*.png
if-no-files-found: error
- name: Failure logs
if: failure()
run: docker-compose logs