File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,15 @@ jobs:
3535 - name : Check basic action execution
3636 uses : ./
3737 with :
38+ allow-empty : true
3839 mode : ${{ matrix.mode }}
3940 run : echo "Working!"
4041 - name : Check action execution with env variables
4142 uses : ./
4243 env :
4344 MY_ENV_VAR : " Hello"
4445 with :
46+ allow-empty : true
4547 mode : ${{ matrix.mode }}
4648 run : |
4749 output=$(echo "$MY_ENV_VAR")
@@ -52,13 +54,15 @@ jobs:
5254 - name : Check action in a custom directory
5355 uses : ./
5456 with :
57+ allow-empty : true
5558 mode : ${{ matrix.mode }}
5659 working-directory : examples
5760 # Check that the directory is actually changed
5861 run : if [ $(basename $(pwd)) != "examples" ]; then exit 1; fi
5962 - name : Check action with multiline command
6063 uses : ./
6164 with :
65+ allow-empty : true
6266 mode : ${{ matrix.mode }}
6367 run : |
6468 echo "Working";
7074 matrix :
7175 version :
7276 - " latest"
73- - " 4.4.0 "
74- - " v4.4.0 "
77+ - " 4.4.1 "
78+ - " v4.4.1 "
7579
7680 runs-on : ubuntu-latest
7781 env :
8185 - name : Check action with version format ${{ matrix.version }}
8286 uses : ./
8387 with :
88+ allow-empty : true
8489 runner-version : ${{ matrix.version }}
8590 mode : simulation
8691 run : echo "Testing version format ${{ matrix.version }}!"
Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ inputs:
6666 required : false
6767 default : " ~/.cache/codspeed-action"
6868
69+ allow-empty :
70+ description : |
71+ Allow the action to complete successfully even if no benchmarks were found or run. Set to 'true' to enable this behavior.
72+ required : false
73+ default : " false"
74+
6975runs :
7076 using : " composite"
7177 steps :
@@ -172,6 +178,9 @@ runs:
172178 if [ "${{ inputs.cache-instruments }}" = "true" ] && [ -n "${{ inputs.instruments-cache-dir }}" ]; then
173179 RUNNER_ARGS="$RUNNER_ARGS --setup-cache-dir=${{ inputs.instruments-cache-dir }}"
174180 fi
181+ if [ -n "${{ inputs.allow-empty }}" ]; then
182+ RUNNER_ARGS="$RUNNER_ARGS --allow-empty"
183+ fi
175184
176185 # Run the benchmarks
177186 codspeed run $RUNNER_ARGS -- '${{ inputs.run }}'
You can’t perform that action at this time.
0 commit comments