Skip to content

Commit 913318b

Browse files
committed
Add code to enable debugging in setup steps on each OS when the debug option is set to true.
1 parent 45b61bf commit 913318b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Diff for: action.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# action.yml
22
name: 'Coveralls GitHub Action'
33
description: 'Send test coverage data to Coveralls.io for analysis, change tracking, and notifications.'
4-
author: 'Nick Merwin (Coveralls, Inc.)'
5-
inputs:
4+
author: Coveralls.io
65
github-token:
76
description: 'Put secrets.GITHUB_TOKEN here'
87
required: false
@@ -80,6 +79,9 @@ runs:
8079
if: runner.os == 'macOS'
8180
shell: bash
8281
run: |
82+
# Enable debugging if 'debug' is true
83+
[ "${{ inputs.debug }}" == "true" ] && set -x
84+
8385
brew tap coverallsapp/coveralls --quiet
8486
brew install coveralls --quiet
8587
@@ -114,6 +116,9 @@ runs:
114116
COVERAGE_REPORTER_VERSION: ${{ inputs.coverage-reporter-version }}
115117
shell: bash
116118
run: |
119+
# Enable debugging if 'debug' is true
120+
[ "${{ inputs.debug }}" == "true" ] && set -x
121+
117122
mkdir -p ~/bin/
118123
cd ~/bin/
119124
@@ -171,6 +176,11 @@ runs:
171176
COVERAGE_REPORTER_VERSION: ${{ inputs.coverage-reporter-version }}
172177
shell: pwsh
173178
run: |
179+
# Enable debugging if 'debug' is true
180+
if ("${{ inputs.debug }}" -eq "true") {
181+
$DebugPreference = 'Continue'
182+
}
183+
174184
New-Item -Path $env:HOME\bin -ItemType directory -Force
175185
Push-Location $env:HOME\bin
176186
if($env:COVERAGE_REPORTER_VERSION -eq "latest") {

0 commit comments

Comments
 (0)