Skip to content

Commit d485ec8

Browse files
committed
feat: support pinning the codspeed-go-runner
1 parent ef6ffc9 commit d485ec8

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 23 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,24 @@ 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+
- "1.0.0"
101+
- "0.6.2"
102+
103+
runs-on: ubuntu-latest
104+
env:
105+
CODSPEED_SKIP_UPLOAD: true
106+
steps:
107+
- uses: actions/checkout@v4
108+
- name: Check action with version format ${{ matrix.version }}
109+
uses: ./
110+
with:
111+
allow-empty: true
112+
go-runner-version: ${{ matrix.version }}
113+
mode: walltime
114+
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)