Skip to content

Commit

Permalink
allow control of bounds-check command option
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jul 6, 2021
1 parent a5f2948 commit 607d74c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ branding:
color: 'gray-dark'

inputs:
check_bounds:
description: 'Value determining which bounds checking setting to use. Options: yes | no | auto. Default value: yes.'
default: 'yes'
coverage:
description: 'Value determining whether to test with coverage or not. Options: true | false. Default value: true.'
default: 'true'
Expand Down Expand Up @@ -48,7 +51,13 @@ runs:
JULIA_PKG_SERVER: ""
- run: |
# The Julia command that will be executed
julia_cmd=( julia --check-bounds=yes --color=yes --depwarn=${{ inputs.depwarn }} --inline=${{ inputs.inline }} --project=${{ inputs.project }} -e 'import Pkg;include(joinpath(ENV["GITHUB_ACTION_PATH"], "kwargs.jl"));kwargs = Kwargs.kwargs(;coverage = :(${{ inputs.coverage }}),force_latest_compatible_version = :(${{ inputs.force_latest_compatible_version }}),);Pkg.test(; kwargs...)' )
if [[ ${{ inputs.check_bounds }} = 'auto' ]]
then
check_bounds_opt=' '
else
check_bounds_opt='--check-bounds=${{ inputs.check_bounds }} '
end
julia_cmd=( julia {{ check_bounds_opt }}--color=yes --depwarn=${{ inputs.depwarn }} --inline=${{ inputs.inline }} --project=${{ inputs.project }} -e 'import Pkg;include(joinpath(ENV["GITHUB_ACTION_PATH"], "kwargs.jl"));kwargs = Kwargs.kwargs(;coverage = :(${{ inputs.coverage }}),force_latest_compatible_version = :(${{ inputs.force_latest_compatible_version }}),);Pkg.test(; kwargs...)' )
# Add the prefix in front of the command if there is one
prefix="${{ inputs.prefix }}"
Expand Down

0 comments on commit 607d74c

Please sign in to comment.