Skip to content

Commit d3af382

Browse files
committed
Add debug statements to understand error.
1 parent 0d6d860 commit d3af382

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

Diff for: action.yml

+23-7
Original file line numberDiff line numberDiff line change
@@ -98,28 +98,44 @@ runs:
9898
run: |
9999
mkdir -p ~/bin/
100100
cd ~/bin/
101-
if [ $COVERAGE_REPORTER_VERSION == "latest" ]
102-
then
103-
asset_path=latest/download
101+
102+
if [ "$COVERAGE_REPORTER_VERSION" == "latest" ]; then
103+
asset_path="latest/download"
104104
else
105105
asset_path="download/${COVERAGE_REPORTER_VERSION}"
106106
fi
107+
108+
# Debugging output to verify asset path
109+
echo "Using asset path: $asset_path"
110+
107111
# Try to download the binary and checksum file
108112
if ! curl -sLO "https://github.com/coverallsapp/coverage-reporter/releases/${asset_path}/coveralls-linux.tar.gz" ||
109-
! curl -sLO "https://github.com/coverallsapp/coverage-reporter/releases/${asset_path}/coveralls-checksums.txt"; then
113+
! curl -sLO "https://github.com/coverallsapp/coverage-reporter/releases/${asset_path}/coveralls-checksums.txt"; then
110114
echo "Failed to download coveralls binary or checksum."
111115
[ "${{ inputs.fail-on-error }}" == "false" ] && exit 0
112116
exit 1
113117
fi
118+
119+
# List files to ensure they are downloaded
120+
echo "Downloaded files:"
121+
ls -la
122+
114123
# Verify the downloaded binary
115124
if ! grep coveralls-linux.tar.gz coveralls-checksums.txt | sha256sum --check; then
116125
echo "Checksum verification failed."
117126
[ "${{ inputs.fail-on-error }}" == "false" ] && exit 0
118127
exit 1
119128
fi
120-
tar -xzf coveralls-linux.tar.gz
121-
rm coveralls-checksums.txt
122-
echo ~/bin >> $GITHUB_PATH
129+
130+
# Extract the tar.gz file
131+
tar -xzf coveralls-linux.tar.gz
132+
133+
# List files again to verify extraction
134+
echo "Files after extraction:"
135+
ls -la
136+
137+
rm coveralls-checksums.txt
138+
echo ~/bin >> $GITHUB_PATH
123139

124140
- name: Install coveralls reporter (Windows)
125141
if: startsWith(runner.os, 'Windows')

0 commit comments

Comments
 (0)