diff options
| author | natsuoto <[email protected]> | 2026-07-15 16:14:14 +0530 |
|---|---|---|
| committer | natsuoto <[email protected]> | 2026-07-15 16:14:14 +0530 |
| commit | b0593f778cc5c9e9db5077e8b7a499c253a91e56 (patch) | |
| tree | f04c50b579c583766cb6294a3c604217c983d742 | |
| parent | 7682321de9195bf903d1cc1d8df87d0f9522636b (diff) | |
| download | edify-b0593f778cc5c9e9db5077e8b7a499c253a91e56.tar.xz edify-b0593f778cc5c9e9db5077e8b7a499c253a91e56.zip | |
chore(ci): move bench-baseline regenerate job to its own workflow so it stops showing as a skipped check on every push
| -rw-r--r-- | .github/workflows/bench-baseline.yml | 37 | ||||
| -rw-r--r-- | .github/workflows/github-actions.yml | 40 |
2 files changed, 38 insertions, 39 deletions
diff --git a/.github/workflows/bench-baseline.yml b/.github/workflows/bench-baseline.yml new file mode 100644 index 0000000..8eb0743 --- /dev/null +++ b/.github/workflows/bench-baseline.yml @@ -0,0 +1,37 @@ +name: 'bench baseline regenerate' +on: + workflow_dispatch: + inputs: + confirm: + description: 'Type YES to confirm regenerating tests/bench/baseline.json on the runner and committing it back' + required: true + default: 'no' +jobs: + regenerate: + name: 'bench: regenerate runner baseline' + runs-on: ubuntu-latest + if: github.event.inputs.confirm == 'YES' + permissions: + contents: write + timeout-minutes: 20 + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 + with: + python-version: '3.11' + - name: install dependencies (includes bench group) + run: uv sync --frozen --all-groups + - name: generate baseline.json on the runner + run: | + uv run pytest tests/bench/ --benchmark-only --benchmark-json=tests/bench/baseline.json + - name: commit the runner-generated baseline back to the branch + run: | + git config user.name 'edify-ci[bot]' + git config user.email '[email protected]' + git add tests/bench/baseline.json + git diff --cached --quiet && exit 0 + git commit -m 'chore(bench): regenerate runner-generated baseline' + git push diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 519dc64..c0ed6e2 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -1,13 +1,5 @@ name: build -on: - push: - pull_request: - workflow_dispatch: - inputs: - regenerate_bench_baseline: - description: 'Regenerate the runner-generated bench baseline and commit it back to the branch' - required: false - default: 'false' +on: [push, pull_request] jobs: test: name: ${{ matrix.name }} @@ -142,7 +134,6 @@ jobs: bench: name: 'bench (advisory)' runs-on: ubuntu-latest - if: github.event_name != 'workflow_dispatch' || github.event.inputs.regenerate_bench_baseline != 'true' timeout-minutes: 15 steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 @@ -160,32 +151,3 @@ jobs: else uv run pytest tests/bench/ --benchmark-only || true fi - - bench-baseline-regenerate: - name: 'bench: regenerate runner baseline' - runs-on: ubuntu-latest - if: github.event_name == 'workflow_dispatch' && github.event.inputs.regenerate_bench_baseline == 'true' - permissions: - contents: write - timeout-minutes: 20 - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 - with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 - with: - python-version: '3.11' - - name: install dependencies (includes bench group) - run: uv sync --frozen --all-groups - - name: generate baseline.json on the runner - run: | - uv run pytest tests/bench/ --benchmark-only --benchmark-json=tests/bench/baseline.json - - name: commit the runner-generated baseline back to the branch - run: | - git config user.name 'edify-ci[bot]' - git config user.email '[email protected]' - git add tests/bench/baseline.json - git diff --cached --quiet && exit 0 - git commit -m 'chore(bench): regenerate runner-generated baseline' - git push |
