make app installable + reorganize code + update requirements #102
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
defaults: | |
run: | |
working-directory: tests | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create env | |
run: cp .env.example .env | |
- 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: Download fixtures | |
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: ./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 |