Files
dibbler/.gitea/workflows/benchmark.yaml
h7x4 2444b99b02
Some checks failed
Run tests / run-tests (push) Successful in 2m7s
Run benchmarks / run-tests (push) Failing after 13m0s
Add benchmarks
2025-12-12 22:56:04 +09:00

59 lines
1.7 KiB
YAML

name: Run benchmarks
on:
workflow_dispatch:
# TODO: make this only workflow_dispatch when merged into main
push:
jobs:
run-tests:
runs-on: debian-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv sync --locked --group test
- name: Run benchmarks
continue-on-error: true
run: |
set -euo pipefail
set -x
PYTEST_ARGS=(
-vv
--benchmark-only
-k test_benchmark
)
uv run -- pytest "${PYTEST_ARGS[@]}"
- name: Upload benchmark JSON report
uses: https://git.pvv.ntnu.no/Projects/rsync-action@v1
with:
source: ./benchmark/*/*.json
target: ${{ gitea.ref_name }}/benchmark/${{ github.run_id }}/benchmark.json
username: gitea-web
ssh-key: ${{ secrets.WEB_SYNC_SSH_KEY }}
host: pages.pvv.ntnu.no
known-hosts: "pages.pvv.ntnu.no ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2QjfFB+city1SYqltkVqWACfo1j37k+oQQfj13mtgg"
- name: Upload histograms
uses: https://git.pvv.ntnu.no/Projects/rsync-action@v1
with:
source: ./benchmark/*.svg
target: ${{ gitea.ref_name }}/benchmark/${{ github.run_id }}/
username: gitea-web
ssh-key: ${{ secrets.WEB_SYNC_SSH_KEY }}
host: pages.pvv.ntnu.no
known-hosts: "pages.pvv.ntnu.no ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2QjfFB+city1SYqltkVqWACfo1j37k+oQQfj13mtgg"
- name: Check failure
if: failure()
run: |
echo "Tests failed"
exit 1