Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ jobs:
echo "Working";
echo "with";
echo "multiple lines";
test-version-formats:

test-runner-version-formats:
strategy:
fail-fast: false
matrix:
Expand All @@ -89,3 +90,24 @@ jobs:
runner-version: ${{ matrix.version }}
mode: simulation
run: echo "Testing version format ${{ matrix.version }}!"

test-go-runner-version-formats:
strategy:
fail-fast: false
matrix:
version:
- "1.0.0"
- "1.0.0-beta.1"

runs-on: ubuntu-latest
env:
CODSPEED_SKIP_UPLOAD: true
steps:
- uses: actions/checkout@v4
- name: Check action with version format ${{ matrix.version }}
uses: ./
with:
allow-empty: true
go-runner-version: ${{ matrix.version }}
mode: walltime
run: echo "Testing version format ${{ matrix.version }}!"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ GitHub Actions for running [CodSpeed](https://codspeed.io) in your CI.
# [OPTIONAL]
# A custom upload url, only if you are using an on premise CodSpeed instance
upload-url: ""

# [OPTIONAL]
# The version of the go-runner to use (e.g., 1.0.0, 1.0.0-beta.1). If not specified, the latest version will be installed
go-runner-version: ""
```
# Example usage
Expand Down
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ inputs:
required: false
default: "false"

go-runner-version:
description: "The version of the go-runner to use (e.g., 1.0.0, 1.0.0-beta.1). If not specified, the latest version will be installed"
required: false

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -182,6 +186,9 @@ runs:
if [ "${{ inputs.allow-empty }}" = "true" ]; then
RUNNER_ARGS="$RUNNER_ARGS --allow-empty"
fi
if [ -n "${{ inputs.go-runner-version }}" ]; then
RUNNER_ARGS="$RUNNER_ARGS --go-runner-version=${{ inputs.go-runner-version }}"
fi

# Run the benchmarks
codspeed run $RUNNER_ARGS -- '${{ inputs.run }}'
Loading