diff --git a/action.yml b/action.yml index ffebb89..dd95e76 100644 --- a/action.yml +++ b/action.yml @@ -8,6 +8,9 @@ inputs: file: description: 'Path to coverage file to upload' required: false + flags: + description: 'Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)' + required: false branding: color: 'red' icon: 'umbrella' @@ -17,3 +20,4 @@ runs: args: - ${{ inputs.token }} - ${{ inputs.file }} + - ${{ inputs.flags }} \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 9ffef70..55a1742 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,14 +5,26 @@ set -eu if [ $# -eq 0 ] then bash <(curl -s https://codecov.io/bash) +elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] +then + bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] then bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE +elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] +then + bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -F $INPUT_FLAGS +elif [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_FILE" != "x" ] +then + bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS -f $INPUT_FILE elif [ "x$INPUT_TOKEN" != "x" ] then bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN elif [ "x$INPUT_FILE" != "x" ] then bash <(curl -s https://codecov.io/bash) -f $INPUT_FILE +elif [ "x$INPUT_FLAGS" != "x" ] +then + bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS fi