This commit is contained in:
2026-04-17 13:55:06 +02:00
parent dfe29400d3
commit 13513b5dcc
2 changed files with 30 additions and 3 deletions
+3 -3
View File
@@ -43,7 +43,7 @@ jobs:
benchmark_attempt:
needs: check_pr_status
if: needs.check_pr_status.outputs.branch-pr == ''
if: needs.check_pr_status.outputs.branch-pr == '' || github.event_name == 'push'
runs-on: ubuntu-latest
continue-on-error: true
defaults:
@@ -216,7 +216,7 @@ jobs:
run: exit 1
- name: Prepare gh-pages for publishing
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/ci/benchmark_workflow')
# if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/ci/benchmark_workflow')
run: |
if git ls-remote --exit-code --heads origin gh-pages; then
git fetch --depth=1 origin gh-pages
@@ -228,7 +228,7 @@ jobs:
fi
- name: Publish benchmark data to gh-pages
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/ci/benchmark_workflow')
# if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/ci/benchmark_workflow')
working-directory: gh-pages-benchmark-data
run: |
mkdir -p benchmarks/history
@@ -0,0 +1,27 @@
from __future__ import annotations
import pytest
from bec_widgets.widgets.containers.dock_area.dock_area import BECDockArea
from bec_widgets.widgets.plots.waveform.waveform import Waveform
from tests.unit_tests.client_mocks import mocked_client
@pytest.fixture
def dock_area(qtbot, mocked_client):
widget = BECDockArea(client=mocked_client)
qtbot.addWidget(widget)
qtbot.waitExposed(widget)
yield widget
def test_add_waveform_to_dock_area(benchmark, dock_area, qtbot, mocked_client):
"""Benchmark adding a Waveform widget to an existing dock area."""
def add_waveform():
dock_area.new("DarkModeButton")
return dock_area
dock = benchmark(add_waveform)
assert dock is not None