ci: avoid running coverage on package only PRs (#32573)
* ci: remove !docs from "core" filters Written like it is now it causes package only PRs to run with coverage. * Try to skip job under condition, see if the workflow proceed * Try to cancel a running CI job * Simplify linux unit-tests, skip windows unit-tests on package PRs * Reduce the inputs to unit-tests workflow * Move control logic to main workflow, remove inputs * Revert "Move control logic to main workflow, remove inputs" This reverts commit0c46fece4c
. * Do not compute "with_coverage" since it's always == to "core" * Remove workflow dispatch from unit tests * Revert "Revert "Move control logic to main workflow, remove inputs"" This reverts commitdd4e4a4e61
. * Try to skip all from the main workflow * Add back bootstrap to needed checks for "all" * Restore the correct logic for conditionals
This commit is contained in:

committed by
GitHub

parent
dc1734f0a6
commit
67534516c7
23
.github/workflows/ci.yaml
vendored
23
.github/workflows/ci.yaml
vendored
@@ -19,12 +19,12 @@ jobs:
|
||||
needs: [ changes ]
|
||||
uses: ./.github/workflows/valid-style.yml
|
||||
with:
|
||||
with_coverage: ${{ needs.changes.outputs.with_coverage }}
|
||||
with_coverage: ${{ needs.changes.outputs.core }}
|
||||
audit-ancient-python:
|
||||
uses: ./.github/workflows/audit.yaml
|
||||
needs: [ changes ]
|
||||
with:
|
||||
with_coverage: ${{ needs.changes.outputs.with_coverage }}
|
||||
with_coverage: ${{ needs.changes.outputs.core }}
|
||||
python_version: 2.7
|
||||
all-prechecks:
|
||||
needs: [ prechecks ]
|
||||
@@ -40,7 +40,6 @@ jobs:
|
||||
bootstrap: ${{ steps.filter.outputs.bootstrap }}
|
||||
core: ${{ steps.filter.outputs.core }}
|
||||
packages: ${{ steps.filter.outputs.packages }}
|
||||
with_coverage: ${{ steps.coverage.outputs.with_coverage }}
|
||||
steps:
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # @v2
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
@@ -65,7 +64,6 @@ jobs:
|
||||
- 'share/spack/**'
|
||||
- '.github/workflows/bootstrap.yml'
|
||||
core:
|
||||
- '!lib/spack/docs/**'
|
||||
- './!(var/**)/**'
|
||||
packages:
|
||||
- 'var/**'
|
||||
@@ -75,18 +73,6 @@ jobs:
|
||||
# job outputs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||
# setting environment variables from earlier steps: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
|
||||
#
|
||||
- id: coverage
|
||||
# Run the subsequent jobs with coverage if core has been modified,
|
||||
# regardless of whether this is a pull request or a push to a branch
|
||||
run: |
|
||||
echo Core changes: ${{ steps.filter.outputs.core }}
|
||||
echo Event name: ${{ github.event_name }}
|
||||
if [ "${{ steps.filter.outputs.core }}" == "true" ]
|
||||
then
|
||||
echo "::set-output name=with_coverage::true"
|
||||
else
|
||||
echo "::set-output name=with_coverage::false"
|
||||
fi
|
||||
bootstrap:
|
||||
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.bootstrap == 'true' }}
|
||||
needs: [ prechecks, changes ]
|
||||
@@ -95,10 +81,6 @@ jobs:
|
||||
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
|
||||
needs: [ prechecks, changes ]
|
||||
uses: ./.github/workflows/unit_tests.yaml
|
||||
with:
|
||||
core: ${{ needs.changes.outputs.core }}
|
||||
packages: ${{ needs.changes.outputs.packages }}
|
||||
with_coverage: ${{ needs.changes.outputs.with_coverage }}
|
||||
windows:
|
||||
if: ${{ github.repository == 'spack/spack' && needs.changes.outputs.core == 'true' }}
|
||||
needs: [ prechecks ]
|
||||
@@ -109,4 +91,3 @@ jobs:
|
||||
steps:
|
||||
- name: Success
|
||||
run: "true"
|
||||
|
||||
|
Reference in New Issue
Block a user