ci(load): add ref input to dispatch nightly against any branch
Adds a `ref` input to workflow_dispatch so the nightly can be triggered from main and run the scenarios against a feature branch that does not yet carry the workflow file (e.g. feat/drive). Empty input falls back to `github.ref`, so cron and bare dispatch are unchanged. The regression-issue title and body now show the tested ref instead of `github.sha`, which always resolves to the workflow's ref (main) under workflow_dispatch and would otherwise mislead.
This commit is contained in:
@@ -14,6 +14,11 @@ on:
|
|||||||
# 03:00 UTC daily — outside US/EU working hours, low contention.
|
# 03:00 UTC daily — outside US/EU working hours, low contention.
|
||||||
- cron: '0 3 * * *'
|
- cron: '0 3 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
ref:
|
||||||
|
description: 'Branch / tag / SHA to load-test (leave blank to use the workflow ref). Lets you dispatch from main and run the scenarios against a feature branch — useful when the target branch does not have the workflow file yet.'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@@ -35,6 +40,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
# `inputs.ref` is set only for workflow_dispatch with a non-empty
|
||||||
|
# value; for cron and bare dispatch it's empty, in which case the
|
||||||
|
# action falls back to the workflow's own ref (`github.ref`). The
|
||||||
|
# `||` short-circuits on empty strings, so the cron path keeps the
|
||||||
|
# exact behaviour it had before.
|
||||||
|
ref: ${{ inputs.ref || github.ref }}
|
||||||
# The self-hosted runner bind-mounts target/ as a persistent volume
|
# The self-hosted runner bind-mounts target/ as a persistent volume
|
||||||
# for fast incremental rebuilds. actions/checkout's default cleanup
|
# for fast incremental rebuilds. actions/checkout's default cleanup
|
||||||
# tries to rmdir it and hits EBUSY on the mount point. Git still
|
# tries to rmdir it and hits EBUSY on the mount point. Git still
|
||||||
@@ -87,6 +98,7 @@ jobs:
|
|||||||
echo "## Load nightly regression"
|
echo "## Load nightly regression"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Run: \`${{ github.run_id }}\` · Commit: \`${{ github.sha }}\`"
|
echo "Run: \`${{ github.run_id }}\` · Commit: \`${{ github.sha }}\`"
|
||||||
|
echo "Ref tested: \`${{ inputs.ref || github.ref }}\`"
|
||||||
echo "Runner: \`${{ runner.name }}\` (\`${{ runner.os }}/${{ runner.arch }}\`)"
|
echo "Runner: \`${{ runner.name }}\` (\`${{ runner.os }}/${{ runner.arch }}\`)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Compare exited non-zero — see uploaded artifact \`load-results-${{ github.run_id }}\` for raw summaries."
|
echo "Compare exited non-zero — see uploaded artifact \`load-results-${{ github.run_id }}\` for raw summaries."
|
||||||
@@ -104,7 +116,10 @@ jobs:
|
|||||||
if: steps.load.outcome == 'failure' && github.repository == 'AtalayaLabs/OxiCloud'
|
if: steps.load.outcome == 'failure' && github.repository == 'AtalayaLabs/OxiCloud'
|
||||||
uses: peter-evans/create-issue-from-file@v5
|
uses: peter-evans/create-issue-from-file@v5
|
||||||
with:
|
with:
|
||||||
title: "Load nightly: regression on ${{ github.sha }}"
|
# `github.sha` resolves to the workflow's ref, not the tested ref,
|
||||||
|
# so when dispatched against a non-default branch we surface the
|
||||||
|
# input explicitly — otherwise the title misleads with main's SHA.
|
||||||
|
title: "Load nightly: regression on ${{ inputs.ref || github.sha }}"
|
||||||
content-filepath: regression-issue.md
|
content-filepath: regression-issue.md
|
||||||
labels: |
|
labels: |
|
||||||
load-test
|
load-test
|
||||||
|
|||||||
Reference in New Issue
Block a user