mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Reduce the amount of always()
steps that run on canceled jobs
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
a018159c14
commit
ff4a7f80f9
2 changed files with 13 additions and 13 deletions
12
.github/workflows/test-action-macos.yml
vendored
12
.github/workflows/test-action-macos.yml
vendored
|
@ -298,13 +298,13 @@ jobs:
|
|||
sudo chown -R "$(id -un)" .
|
||||
|
||||
- name: Combine Coverage Reports
|
||||
if: always()
|
||||
if: always() && job.status != 'cancelled'
|
||||
run: |
|
||||
nox -e combine-coverage
|
||||
|
||||
- name: Prepare Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always()
|
||||
if: always() && job.status != 'cancelled'
|
||||
run: |
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
# from it showing in the tree command below
|
||||
|
@ -314,7 +314,7 @@ jobs:
|
|||
echo "COVERAGE_FILE=artifacts/coverage/.coverage.${{ inputs.distro-slug }}.${{ env.NOX_SESSION }}.${{ matrix.tests-chunk }}" >> GITHUB_ENV
|
||||
|
||||
- name: Upload Test Run Artifacts
|
||||
if: always()
|
||||
if: always() && job.status != 'cancelled'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: testrun-artifacts-${{ inputs.distro-slug }}-${{ env.NOX_SESSION }}
|
||||
|
@ -332,20 +332,20 @@ jobs:
|
|||
# annotate_only: true
|
||||
|
||||
- name: Report Salt Code Coverage(${{ matrix.tests-chunk }})
|
||||
if: always()
|
||||
if: always() && job.status != 'cancelled'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage -- salt
|
||||
|
||||
- name: Report Tests Code Coverage(${{ matrix.tests-chunk }})
|
||||
if: always()
|
||||
if: always() && job.status != 'cancelled'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage -- tests
|
||||
|
||||
- name: Report Combined Code Coverage(${{ matrix.tests-chunk }})
|
||||
continue-on-error: true
|
||||
if: always()
|
||||
if: always() && job.status != 'cancelled'
|
||||
run: |
|
||||
nox --force-color -e report-coverage
|
||||
|
||||
|
|
14
.github/workflows/test-action.yml
vendored
14
.github/workflows/test-action.yml
vendored
|
@ -289,13 +289,13 @@ jobs:
|
|||
${{ matrix.tests-chunk }} -- --run-slow
|
||||
|
||||
- name: Combine Coverage Reports
|
||||
if: always() && steps.spin-up-vm.outcome == 'success'
|
||||
if: always() && steps.spin-up-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
tools --timestamps vm combine-coverage ${{ inputs.distro-slug }}
|
||||
|
||||
- name: Download Test Run Artifacts
|
||||
id: download-artifacts-from-vm
|
||||
if: always() && steps.spin-up-vm.outcome == 'success'
|
||||
if: always() && steps.spin-up-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
run: |
|
||||
tools --timestamps vm download-artifacts ${{ inputs.distro-slug }}
|
||||
# Delete the salt onedir, we won't need it anymore and it will prevent
|
||||
|
@ -311,7 +311,7 @@ jobs:
|
|||
tools --timestamps vm destroy ${{ inputs.distro-slug }} || true
|
||||
|
||||
- name: Upload Test Run Artifacts
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: testrun-artifacts-${{ inputs.distro-slug }}-${{ env.NOX_SESSION }}
|
||||
|
@ -329,7 +329,7 @@ jobs:
|
|||
# annotate_only: true
|
||||
|
||||
- name: Install Nox
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
env:
|
||||
PIP_INDEX_URL: https://pypi-proxy.saltstack.net/root/local/+simple/
|
||||
PIP_EXTRA_INDEX_URL: https://pypi.org/simple
|
||||
|
@ -337,19 +337,19 @@ jobs:
|
|||
python3 -m pip install 'nox==${{ env.NOX_VERSION }}'
|
||||
|
||||
- name: Report Salt Code Coverage(${{ matrix.tests-chunk }})
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage -- salt
|
||||
|
||||
- name: Report Tests Code Coverage(${{ matrix.tests-chunk }})
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage -- tests
|
||||
|
||||
- name: Report Combined Code Coverage(${{ matrix.tests-chunk }})
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success'
|
||||
if: always() && steps.download-artifacts-from-vm.outcome == 'success' && job.status != 'cancelled'
|
||||
continue-on-error: true
|
||||
run: |
|
||||
nox --force-color -e report-coverage
|
||||
|
|
Loading…
Add table
Reference in a new issue