diff --git a/action.yml b/action.yml index cce0ff55..74d5eeab 100644 --- a/action.yml +++ b/action.yml @@ -57,15 +57,23 @@ runs: run: | brew tap coverallsapp/coveralls --quiet brew install coveralls --quiet + - name: Install coveralls reporter (Linux) if: runner.os == 'Linux' shell: bash run: curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar xz -C /usr/local/bin - - name: Finish report + - name: Install coveralls reporter (Windows) + if: startsWith(runner.os, 'Windows') + shell: bash + run: | + mkdir -p ~/bin/ + curl -sL https://github.com/mrexox/coverage-reporter/releases/download/v0.1.11/coveralls-windows.zip | zcat > ~/bin/coveralls.exe + + - name: Done report if: inputs.parallel-finished == 'true' shell: bash - run: coveralls --done ${{ inputs.debug == 'true' && '--debug' }} + run: coveralls --done ${{ inputs.debug == 'true' && '--debug' || '' }} env: COVERALLS_DEBUG: ${{ inputs.debug }} COVERALLS_CARRYFORWARD_FLAGS: ${{ inputs.carryforward }} @@ -76,7 +84,7 @@ runs: COVERALLS_GIT_COMMIT: ${{ inputs.git-commit }} COVERALLS_REPO_TOKEN: ${{ inputs.github-token }} - - name: Report + - name: Coverage report if: inputs.parallel-finished != 'true' shell: bash run: >- diff --git a/coveralls.sh b/coveralls.sh deleted file mode 100755 index 37e8f8de..00000000 --- a/coveralls.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -download() { - [[ "$COVERALLS_DEBUG" == "true" ]] && set -x - if [[ "$RUNNER_OS" == "macOS" ]] - then - brew tap coverallsapp/coveralls - brew install coveralls - elif [[ "$RUNNER_OS" == "Windos" ]] - then - # TODO: Add a step for windows - else - curl -L https://coveralls.io/coveralls-linux.tar.gz | tar xz -C /usr/local/bin - fi - [[ "$COVERALLS_DEBUG" == "true" ]] && set +x -} - -call() { - if [[ -n $COVERALLS__DONE ]]; then - coveralls --done - else - local args="" - [[ -n $COVERALLS__FILE ]] && args="$args --file $COVERALLS__FILE" - [[ -n $COVERALLS__BASE_PATH ]] && args="$args --base-path $COVERALLS__BASE_PATH" - [[ "$COVERALLS_DEBUG" == "true" ]] && args="$args --debug" - - coveralls $args - fi -} - -if [[ -n $1 ]] -then - $1 -else - download - call -fi