Skip to content

Commit

Permalink
Hide internals of some groupped workflows
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 committed Mar 29, 2024
1 parent a2f5307 commit 00c3bf2
Show file tree
Hide file tree
Showing 3 changed files with 17 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,9 @@ jobs:
contents: read
packages: read
secrets: inherit
if: >
needs.build-info.outputs.run-tests == 'true' &&
(inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false')
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
Expand All @@ -446,7 +450,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,9 +599,11 @@ jobs:
- tests-mysql
- tests-postgres
- tests-non-db
- tests-special
- tests-integration
uses: ./.github/workflows/finalize-tests.yml
if: >
needs.build-info.outputs.canary-run == 'true' ||
needs.build-info.outputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ needs.build-info.outputs.runs-on }}
image-tag: ${{ needs.build-info.outputs.image-tag }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/special-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ inputs.runs-on }}
downgrade-sqlalchemy: "true"
Expand All @@ -88,7 +88,7 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ inputs.runs-on }}
upgrade-boto: "true"
Expand All @@ -111,7 +111,7 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ inputs.runs-on }}
pydantic: "v1"
Expand All @@ -134,7 +134,7 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ inputs.runs-on }}
pydantic: "none"
Expand All @@ -157,7 +157,7 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ inputs.runs-on }}
downgrade-pendulum: "true"
Expand All @@ -180,7 +180,7 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ inputs.runs-on }}
enable-aip-44: "false"
Expand All @@ -203,7 +203,7 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ inputs.runs-on }}
test-name: "Postgres"
Expand All @@ -225,7 +225,7 @@ jobs:
contents: read
packages: read
secrets: inherit
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies == 'true'
if: inputs.canary-run == 'true' || inputs.upgrade-to-newer-dependencies != 'false'
with:
runs-on: ${{ inputs.runs-on }}
test-name: "Postgres"
Expand Down

0 comments on commit 00c3bf2

Please sign in to comment.