mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
We need to send less reports to codecov.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
7d767770f6
commit
6953b8167c
2 changed files with 150 additions and 145 deletions
150
.github/workflows/test-action-macos.yml
vendored
150
.github/workflows/test-action-macos.yml
vendored
|
@ -314,81 +314,6 @@ jobs:
|
|||
run: |
|
||||
nox -e combine-coverage
|
||||
|
||||
- name: Create XML Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && job.status != 'cancelled'
|
||||
run: |
|
||||
nox -e create-xml-coverage-reports
|
||||
|
||||
- name: Install Codecov CLI
|
||||
if: always() && inputs.skip-code-coverage == false && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
# python3 -m pip install codecov-cli
|
||||
#
|
||||
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --import
|
||||
curl -Os https://uploader.codecov.io/latest/macos/codecov
|
||||
curl -Os https://uploader.codecov.io/latest/macos/codecov.SHA256SUM
|
||||
curl -Os https://uploader.codecov.io/latest/macos/codecov.SHA256SUM.sig
|
||||
gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM
|
||||
shasum -a 256 -c codecov.SHA256SUM
|
||||
chmod +x codecov
|
||||
|
||||
- name: Upload Source Code Coverage To Codecov
|
||||
if: always() && inputs.skip-code-coverage == false && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
#codecovcli --auto-load-params-from GithubActions --verbose --token ${{ secrets.CODECOV_TOKEN }} \
|
||||
# do-upload --git-service github --sha ${{ github.sha }} \
|
||||
# --file artifacts/coverage/salt.xml --flag ${{ matrix.transport }} \
|
||||
# --flag salt --flag ${{ inputs.distro-slug }} --flag ${{ matrix.tests-chunk }} \
|
||||
# --name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }}
|
||||
n=0
|
||||
until [ "$n" -ge 5 ]
|
||||
do
|
||||
if ./codecov --file artifacts/coverage/salt.xml \
|
||||
--sha ${{ github.event.pull_request.head.sha || github.sha }} ${{ github.event_name == 'pull_request' && format('--parent {0}', github.event.pull_request.base.sha) }} \
|
||||
--flags salt,${{ inputs.distro-slug }},${{ matrix.transport }},${{ matrix.tests-chunk }} \
|
||||
--name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }} --nonZero; then
|
||||
rc=$?
|
||||
break
|
||||
fi
|
||||
rc=$?
|
||||
n=$((n+1))
|
||||
sleep 15
|
||||
done
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
echo "Failed to upload codecov stats"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Tests Code Coverage To Codecov
|
||||
if: always() && inputs.skip-code-coverage == false && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
#codecovcli --auto-load-params-from GithubActions --verbose --token ${{ secrets.CODECOV_TOKEN }} \
|
||||
# do-upload --git-service github --sha ${{ github.sha }} \
|
||||
# --file artifacts/coverage/tests.xml --flag ${{ matrix.transport }} \
|
||||
# --flag tests --flag ${{ inputs.distro-slug }} --flag ${{ matrix.tests-chunk }} \
|
||||
# --name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }}
|
||||
n=0
|
||||
until [ "$n" -ge 5 ]
|
||||
do
|
||||
if ./codecov --file artifacts/coverage/tests.xml \
|
||||
--sha ${{ github.event.pull_request.head.sha || github.sha }} ${{ github.event_name == 'pull_request' && format('--parent {0}', github.event.pull_request.base.sha) }} \
|
||||
--flags tests,${{ inputs.distro-slug }},${{ matrix.transport }},${{ matrix.tests-chunk }} \
|
||||
--name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }} --nonZero; then
|
||||
rc=$?
|
||||
break
|
||||
fi
|
||||
rc=$?
|
||||
n=$((n+1))
|
||||
sleep 15
|
||||
done
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
echo "Failed to upload codecov stats"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Prepare Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always() && job.status != 'cancelled'
|
||||
|
@ -481,6 +406,81 @@ jobs:
|
|||
run: |
|
||||
nox --force-color -e combine-coverage
|
||||
|
||||
- name: Create XML Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
nox -e create-xml-coverage-reports
|
||||
|
||||
- name: Install Codecov CLI
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
# python3 -m pip install codecov-cli
|
||||
#
|
||||
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --import
|
||||
curl -Os https://uploader.codecov.io/latest/macos/codecov
|
||||
curl -Os https://uploader.codecov.io/latest/macos/codecov.SHA256SUM
|
||||
curl -Os https://uploader.codecov.io/latest/macos/codecov.SHA256SUM.sig
|
||||
gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM
|
||||
shasum -a 256 -c codecov.SHA256SUM
|
||||
chmod +x codecov
|
||||
|
||||
- name: Upload Source Code Coverage To Codecov
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
#codecovcli --auto-load-params-from GithubActions --verbose --token ${{ secrets.CODECOV_TOKEN }} \
|
||||
# do-upload --git-service github --sha ${{ github.sha }} \
|
||||
# --file artifacts/coverage/salt.xml \
|
||||
# --flag salt --flag ${{ inputs.distro-slug }} \
|
||||
# --name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}
|
||||
n=0
|
||||
until [ "$n" -ge 5 ]
|
||||
do
|
||||
if ./codecov --file artifacts/coverage/salt.xml \
|
||||
--sha ${{ github.event.pull_request.head.sha || github.sha }} ${{ github.event_name == 'pull_request' && format('--parent {0}', github.event.pull_request.base.sha) }} \
|
||||
--flags salt,${{ inputs.distro-slug }} \
|
||||
--name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }} --nonZero; then
|
||||
rc=$?
|
||||
break
|
||||
fi
|
||||
rc=$?
|
||||
n=$((n+1))
|
||||
sleep 15
|
||||
done
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
echo "Failed to upload codecov stats"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Tests Code Coverage To Codecov
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
#codecovcli --auto-load-params-from GithubActions --verbose --token ${{ secrets.CODECOV_TOKEN }} \
|
||||
# do-upload --git-service github --sha ${{ github.sha }} \
|
||||
# --file artifacts/coverage/tests.xml \
|
||||
# --flag tests --flag ${{ inputs.distro-slug }} \
|
||||
# --name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}
|
||||
n=0
|
||||
until [ "$n" -ge 5 ]
|
||||
do
|
||||
if ./codecov --file artifacts/coverage/tests.xml \
|
||||
--sha ${{ github.event.pull_request.head.sha || github.sha }} ${{ github.event_name == 'pull_request' && format('--parent {0}', github.event.pull_request.base.sha) }} \
|
||||
--flags tests,${{ inputs.distro-slug }} \
|
||||
--name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }} --nonZero; then
|
||||
rc=$?
|
||||
break
|
||||
fi
|
||||
rc=$?
|
||||
n=$((n+1))
|
||||
sleep 15
|
||||
done
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
echo "Failed to upload codecov stats"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
145
.github/workflows/test-action.yml
vendored
145
.github/workflows/test-action.yml
vendored
|
@ -275,76 +275,6 @@ jobs:
|
|||
run: |
|
||||
tools --timestamps vm destroy --no-wait ${{ inputs.distro-slug }} || true
|
||||
|
||||
- name: Install Codecov CLI
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
# python3 -m pip install codecov-cli
|
||||
#
|
||||
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --import
|
||||
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
||||
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
||||
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
|
||||
gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM
|
||||
shasum -a 256 -c codecov.SHA256SUM
|
||||
chmod +x codecov
|
||||
|
||||
- name: Upload Source Code Coverage To Codecov
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
#codecovcli --auto-load-params-from GithubActions --verbose --token ${{ secrets.CODECOV_TOKEN }} \
|
||||
# do-upload --git-service github --sha ${{ github.sha }} \
|
||||
# --file artifacts/coverage/salt.xml --flag ${{ matrix.transport }} \
|
||||
# --flag salt --flag ${{ inputs.distro-slug }} --flag ${{ matrix.tests-chunk }} \
|
||||
# --name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }}
|
||||
n=0
|
||||
until [ "$n" -ge 5 ]
|
||||
do
|
||||
if ./codecov --file artifacts/coverage/salt.xml \
|
||||
--sha ${{ github.event.pull_request.head.sha || github.sha }} ${{ github.event_name == 'pull_request' && format('--parent {0}', github.event.pull_request.base.sha) }} \
|
||||
--flags salt,${{ inputs.distro-slug }},${{ matrix.transport }},${{ matrix.tests-chunk }} \
|
||||
--name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }} --nonZero; then
|
||||
rc=$?
|
||||
break
|
||||
fi
|
||||
rc=$?
|
||||
n=$((n+1))
|
||||
sleep 15
|
||||
done
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
echo "Failed to upload codecov stats"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Tests Code Coverage To Codecov
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
#codecovcli --auto-load-params-from GithubActions --verbose --token ${{ secrets.CODECOV_TOKEN }} \
|
||||
# do-upload --git-service github --sha ${{ github.sha }} \
|
||||
# --file artifacts/coverage/tests.xml --flag ${{ matrix.transport }} \
|
||||
# --flag tests --flag ${{ inputs.distro-slug }} --flag ${{ matrix.tests-chunk }} \
|
||||
# --name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }}
|
||||
n=0
|
||||
until [ "$n" -ge 5 ]
|
||||
do
|
||||
if ./codecov --file artifacts/coverage/tests.xml \
|
||||
--sha ${{ github.event.pull_request.head.sha || github.sha }} ${{ github.event_name == 'pull_request' && format('--parent {0}', github.event.pull_request.base.sha) }} \
|
||||
--flags tests,${{ inputs.distro-slug }},${{ matrix.transport }},${{ matrix.tests-chunk }} \
|
||||
--name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }} --nonZero; then
|
||||
rc=$?
|
||||
break
|
||||
fi
|
||||
rc=$?
|
||||
n=$((n+1))
|
||||
sleep 15
|
||||
done
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
echo "Failed to upload codecov stats"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Code Coverage Test Run Artifacts
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
uses: actions/upload-artifact@v3
|
||||
|
@ -423,6 +353,81 @@ jobs:
|
|||
run: |
|
||||
nox --force-color -e combine-coverage
|
||||
|
||||
- name: Create XML Coverage Reports
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
nox -e create-xml-coverage-reports
|
||||
|
||||
- name: Install Codecov CLI
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
# python3 -m pip install codecov-cli
|
||||
#
|
||||
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --import
|
||||
curl -Os https://uploader.codecov.io/latest/linux/codecov
|
||||
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
|
||||
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
|
||||
gpg --verify codecov.SHA256SUM.sig codecov.SHA256SUM
|
||||
shasum -a 256 -c codecov.SHA256SUM
|
||||
chmod +x codecov
|
||||
|
||||
- name: Upload Source Code Coverage To Codecov
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
#codecovcli --auto-load-params-from GithubActions --verbose --token ${{ secrets.CODECOV_TOKEN }} \
|
||||
# do-upload --git-service github --sha ${{ github.sha }} \
|
||||
# --file artifacts/coverage/salt.xml \
|
||||
# --flag salt --flag ${{ inputs.distro-slug }} \
|
||||
# --name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}
|
||||
n=0
|
||||
until [ "$n" -ge 5 ]
|
||||
do
|
||||
if ./codecov --file artifacts/coverage/salt.xml \
|
||||
--sha ${{ github.event.pull_request.head.sha || github.sha }} ${{ github.event_name == 'pull_request' && format('--parent {0}', github.event.pull_request.base.sha) }} \
|
||||
--flags salt,${{ inputs.distro-slug }} \
|
||||
--name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }} --nonZero; then
|
||||
rc=$?
|
||||
break
|
||||
fi
|
||||
rc=$?
|
||||
n=$((n+1))
|
||||
sleep 15
|
||||
done
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
echo "Failed to upload codecov stats"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Tests Code Coverage To Codecov
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
# We can't yet use tokenless uploads with the codecov CLI
|
||||
#codecovcli --auto-load-params-from GithubActions --verbose --token ${{ secrets.CODECOV_TOKEN }} \
|
||||
# do-upload --git-service github --sha ${{ github.sha }} \
|
||||
# --file artifacts/coverage/tests.xml \
|
||||
# --flag tests --flag ${{ inputs.distro-slug }} \
|
||||
# --name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}
|
||||
n=0
|
||||
until [ "$n" -ge 5 ]
|
||||
do
|
||||
if ./codecov --file artifacts/coverage/tests.xml \
|
||||
--sha ${{ github.event.pull_request.head.sha || github.sha }} ${{ github.event_name == 'pull_request' && format('--parent {0}', github.event.pull_request.base.sha) }} \
|
||||
--flags tests,${{ inputs.distro-slug }} \
|
||||
--name ${{ inputs.distro-slug }}.${{ env.NOX_SESSION }} --nonZero; then
|
||||
rc=$?
|
||||
break
|
||||
fi
|
||||
rc=$?
|
||||
n=$((n+1))
|
||||
sleep 15
|
||||
done
|
||||
if [ "$rc" -ne 0 ]; then
|
||||
echo "Failed to upload codecov stats"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload Code Coverage DB
|
||||
if: always() && inputs.skip-code-coverage == false && steps.download-coverage-artifacts.outcome == 'success'
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
Loading…
Add table
Reference in a new issue