Skip to content

Commit

Permalink
Hide internals of some groupped workflows (#38604)
Browse files Browse the repository at this point in the history
When the whole workflow can be skipped and it's one of the workflows
than nothing depends on, we can skip the whole workflow rather than
individual jobs - then the workflow will not be shown as unfolded
with all the jobs skipped but as a single skipped workflow.

This is what we do for Additional CI image tests and Finalize tests
& special tests.
  • Loading branch information
potiuk authored Mar 29, 2024
1 parent 88a284d commit 3f4872b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/additional-ci-image-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
use-uv: "true"
include-success-outputs: ${{ inputs.include-success-outputs }}
docker-cache: ${{ inputs.docker-cache }}
if: inputs.canary-run == 'true' && inputs.branch == 'main'
if: inputs.branch == 'main'

# Check that after earlier cache push, breeze command will build quickly
check-that-image-builds-quickly:
Expand All @@ -119,7 +119,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
VERBOSE: "true"
if: inputs.canary-run == 'true' && inputs.branch == 'main'
if: inputs.branch == 'main'
steps:
- name: "Cleanup repo"
shell: bash
Expand Down Expand Up @@ -159,4 +159,3 @@ jobs:
use-uv: "true"
upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }}
docker-cache: ${{ inputs.docker-cache }}
if: inputs.canary-run == 'true'
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ jobs:
name: "Additional CI image checks"
needs: [build-info, wait-for-ci-images]
uses: ./.github/workflows/additional-ci-image-checks.yml
if: needs.build-info.outputs.canary-run == 'true'
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
Expand Down Expand Up @@ -436,6 +437,11 @@ jobs:
contents: read
packages: read
secrets: inherit
if: >
needs.build-info.outputs.run-tests == 'true' &&
(needs.build-info.outputs.canary-run == 'true' ||
needs.build-info.outputs.upgrade-to-newer-dependencies != 'false' ||
needs.build-info.outputs.full-tests-needed == 'true')
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
Expand All @@ -446,7 +452,6 @@ jobs:
canary-run: ${{ needs.build-info.outputs.canary-run }}
upgrade-to-newer-dependencies: ${{ needs.build-info.outputs.upgrade-to-newer-dependencies }}
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
if: needs.build-info.outputs.run-tests == 'true'

tests-integration:
name: Integration Tests
Expand Down Expand Up @@ -596,8 +601,8 @@ jobs:
- tests-mysql
- tests-postgres
- tests-non-db
- tests-special
- tests-integration
- tests-special
uses: ./.github/workflows/finalize-tests.yml
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/special-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on: ${{ inputs.runs-on }}
downgrade-sqlalchemy: "true"
Expand All @@ -88,7 +87,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on: ${{ inputs.runs-on }}
upgrade-boto: "true"
Expand All @@ -111,7 +109,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on: ${{ inputs.runs-on }}
pydantic: "v1"
Expand All @@ -134,7 +131,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on: ${{ inputs.runs-on }}
pydantic: "none"
Expand All @@ -157,7 +153,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on: ${{ inputs.runs-on }}
downgrade-pendulum: "true"
Expand All @@ -180,7 +175,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on: ${{ inputs.runs-on }}
enable-aip-44: "false"
Expand All @@ -203,7 +197,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on: ${{ inputs.runs-on }}
test-name: "Postgres"
Expand All @@ -225,7 +218,6 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
with:
runs-on: ${{ inputs.runs-on }}
test-name: "Postgres"
Expand Down

0 comments on commit 3f4872b

Please sign in to comment.