diff --git a/.github/actions/test-python/action.yml b/.github/actions/test-python/action.yml index bd53a08..053c970 100644 --- a/.github/actions/test-python/action.yml +++ b/.github/actions/test-python/action.yml @@ -109,7 +109,7 @@ runs: else coverage_arg="" if [ ${{ inputs.min-coverage }} -gt 0 ]; then - coverage_arg="--cov-fail-under=${{ inputs.min-coverage }}" + coverage_arg="--cov-fail-under="${{ inputs.min-coverage }} fi pytest --cov --cov-report html -n auto $coverage_arg fi @@ -118,8 +118,11 @@ runs: - name: Get the coverage file. if: inputs.should-run-tests == 'yes' && inputs.upload-coverage == 'yes' run: | + coverage_prefix='' + if [ ${{ inputs.coverage-prefix }} != '' ]; then + coverage_prefix=${{ inputs.coverage-prefix }}- + fi coverage_branch=${${{ inputs.branch }}//+([\"\:<>|\*\?\\\/])/-} - coverage_prefix=${{ inputs.coverage-prefix != '' && "${{ inputs.coverage-prefix }}-" }} coverage_dir=${coverage_prefix}coverage-${coverage_branch} mkdir -p ${coverage_dir} && sudo cp -r coverage ${coverage_dir}