Skip to content

Commit

Permalink
Add workaround for codecov/codecov-action#1731
Browse files Browse the repository at this point in the history
  • Loading branch information
ffried committed Dec 24, 2024
1 parent 10eee35 commit 6886e05
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions swift/test/spm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,30 @@ runs:
- uses: sersoft-gmbh/swift-coverage-action@v4
if: ${{ inputs.skip-codecov != 'true' }}
id: coverage-files
# - name: Workaround for codecov/feedback#263
# if: ${{ inputs.skip-codecov != 'true' && runner.os == 'Linux' }}
# shell: bash
# run: git config --global --add safe.directory "${GITHUB_WORKSPACE}"
- name: Workaround for codecov/codecov-action#1731
if: ${{ inputs.skip-codecov != 'true' && runner.os == 'Linux' }}
shell: bash
# We might be running in a container which does not have these tools installed
run: |
PACKAGES=()
if [ -z "$(which curl)" ]; then
PACKAGES+=('curl')
fi
if [ -z "$(which jq)" ]; then
PACKAGES+=('jq')
fi
if [ "${#PACKAGES}" -gt 0 ]; then
if [ -n "$(which apt-get)" ]; then
apt-get update --quiet
apt-get install --assume-yes --no-install-recommends "${PACKAGES[@]}"
elif [ -n "$(which brew)" ]; then
brew update
brew install "${PACKAGES[@]}"
else
echo '::error title=Missing dependencies::There are missing codecov dependencies and no suitable package manager was found!'
exit 1
fi
fi
- uses: codecov/codecov-action@v5
if: ${{ inputs.skip-codecov != 'true' }}
with:
Expand Down

0 comments on commit 6886e05

Please sign in to comment.