Skip to content

Commit 11a039a

Browse files
committed
feat: support pinning the codspeed-go-runner
1 parent 68f4ed5 commit 11a039a

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ jobs:
6969
echo "Working";
7070
echo "with";
7171
echo "multiple lines";
72-
test-version-formats:
72+
73+
test-runner-version-formats:
7374
strategy:
7475
fail-fast: false
7576
matrix:
@@ -90,3 +91,25 @@ jobs:
9091
runner-version: ${{ matrix.version }}
9192
mode: simulation
9293
run: echo "Testing version format ${{ matrix.version }}!"
94+
95+
test-go-runner-version-formats:
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
version:
100+
- "latest"
101+
- "1.0.0"
102+
- "v1.0.0"
103+
104+
runs-on: ubuntu-latest
105+
env:
106+
CODSPEED_SKIP_UPLOAD: true
107+
steps:
108+
- uses: actions/checkout@v4
109+
- name: Check action with version format ${{ matrix.version }}
110+
uses: ./
111+
with:
112+
allow-empty: true
113+
go-runner-version: ${{ matrix.version }}
114+
mode: walltime
115+
run: echo "Testing version format ${{ matrix.version }}!"

action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ inputs:
4343
description: "The version of the runner to use. Use 'latest' to automatically fetch the latest release version from GitHub, or specify a version like '3.5.0' or 'v3.5.0'."
4444
required: false
4545

46+
go-runner-version:
47+
description: "The version of the Go runner to use. Use 'latest' to automatically fetch the latest release version from GitHub, or specify a version like '3.5.0' or 'v3.5.0'."
48+
required: false
49+
4650
instruments:
4751
description: |
4852
Comma separated list of instruments to enable. The following instruments are available:
@@ -182,6 +186,9 @@ runs:
182186
if [ "${{ inputs.allow-empty }}" = "true" ]; then
183187
RUNNER_ARGS="$RUNNER_ARGS --allow-empty"
184188
fi
189+
if [ -n "${{ inputs.go-runner-version }}" ]; then
190+
RUNNER_ARGS="$RUNNER_ARGS --go-runner-version=${{ inputs.go-runner-version }}"
191+
fi
185192
186193
# Run the benchmarks
187194
codspeed run $RUNNER_ARGS -- '${{ inputs.run }}'

0 commit comments

Comments
 (0)