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
2 changes: 1 addition & 1 deletion .codspeed-runner-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.0
4.4.1
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ jobs:
- name: Check basic action execution
uses: ./
with:
allow-empty: true
mode: ${{ matrix.mode }}
run: echo "Working!"
- name: Check action execution with env variables
uses: ./
env:
MY_ENV_VAR: "Hello"
with:
allow-empty: true
mode: ${{ matrix.mode }}
run: |
output=$(echo "$MY_ENV_VAR")
Expand All @@ -52,13 +54,15 @@ jobs:
- name: Check action in a custom directory
uses: ./
with:
allow-empty: true
mode: ${{ matrix.mode }}
working-directory: examples
# Check that the directory is actually changed
run: if [ $(basename $(pwd)) != "examples" ]; then exit 1; fi
- name: Check action with multiline command
uses: ./
with:
allow-empty: true
mode: ${{ matrix.mode }}
run: |
echo "Working";
Expand All @@ -70,8 +74,8 @@ jobs:
matrix:
version:
- "latest"
- "4.4.0"
- "v4.4.0"
- "4.4.1"
- "v4.4.1"

runs-on: ubuntu-latest
env:
Expand All @@ -81,6 +85,7 @@ jobs:
- name: Check action with version format ${{ matrix.version }}
uses: ./
with:
allow-empty: true
runner-version: ${{ matrix.version }}
mode: simulation
run: echo "Testing version format ${{ matrix.version }}!"
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ inputs:
required: false
default: "~/.cache/codspeed-action"

allow-empty:
description: |
Allow the action to complete successfully even if no benchmarks were found or run. Set to 'true' to enable this behavior.
required: false
default: "false"

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -172,6 +178,9 @@ runs:
if [ "${{ inputs.cache-instruments }}" = "true" ] && [ -n "${{ inputs.instruments-cache-dir }}" ]; then
RUNNER_ARGS="$RUNNER_ARGS --setup-cache-dir=${{ inputs.instruments-cache-dir }}"
fi
if [ -n "${{ inputs.allow-empty }}" ]; then
RUNNER_ARGS="$RUNNER_ARGS --allow-empty"
fi

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