Skip to content

Commit 9fb4626

Browse files
author
Anders Brams
committed
fix: only run on pull requests
1 parent 2dbc83a commit 9fb4626

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/qa.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
run: uv run pytest -n auto
4040

4141
benchmark:
42-
name: Generation benchmark
42+
name: Performance benchmark
43+
if: github.event_name == 'pull_request'
4344
runs-on: ubuntu-latest
4445
timeout-minutes: 15
4546

@@ -48,7 +49,6 @@ jobs:
4849
uses: actions/checkout@v4
4950

5051
- name: Check out base repository
51-
if: github.event_name == 'pull_request'
5252
uses: actions/checkout@v4
5353
with:
5454
ref: ${{ github.event.pull_request.base.sha }}
@@ -65,21 +65,19 @@ jobs:
6565
- name: Sync packages
6666
run: uv sync --locked --all-packages
6767

68-
- name: Benchmark base generation
69-
if: github.event_name == 'pull_request'
68+
- name: Benchmark generation (base)
7069
run: >
7170
uv run python scripts/benchmark_generate.py run --package-path
7271
.benchmark/base --spec tests/performance/nautobot.json.gz --repeat 5
7372
--warmup 1 --output .benchmark/base.json
7473
75-
- name: Benchmark current generation
74+
- name: Benchmark generation (current)
7675
run: >
7776
uv run python scripts/benchmark_generate.py run --package-path .
7877
--spec tests/performance/nautobot.json.gz --repeat 5 --warmup 1
7978
--output .benchmark/current.json
8079
8180
- name: Check generation regression
82-
if: github.event_name == 'pull_request'
8381
run: >
8482
uv run python scripts/benchmark_generate.py compare --baseline
8583
.benchmark/base.json --candidate .benchmark/current.json

0 commit comments

Comments
 (0)