Skip to content

Commit

Permalink
ci: job naming improvements and success job for matrix (#12316)
Browse files Browse the repository at this point in the history
Co-authored-by: bo0tzz <[email protected]>
  • Loading branch information
zackpollard and bo0tzz committed Sep 4, 2024
1 parent 77e6a6d commit 0d6bef2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions:

jobs:
publish:
name: Publish
name: CLI Publish
runs-on: ubuntu-latest
defaults:
run:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,16 @@ jobs:
BUILD_IMAGE=${{ github.event_name == 'release' && github.ref_name || steps.metadata.outputs.tags }}
BUILD_SOURCE_REF=${{ github.ref_name }}
BUILD_SOURCE_COMMIT=${{ github.sha }}
success-check:
name: Docker Build & Push Success
needs: [build_and_push_ml, build_and_push_server]
runs-on: ubuntu-latest
if: always()
steps:
- name: Any jobs failed?
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: All jobs passed or skipped
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: echo "All jobs passed or skipped" && echo "${{ toJSON(needs.*.result) }}"
1 change: 1 addition & 0 deletions .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
run: echo "should_force=${{ github.event_name == 'release' }}" >> "$GITHUB_OUTPUT"

build:
name: Docs Build
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run == 'true' }}
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
checks:
name: Docs Deploy Checks
runs-on: ubuntu-latest
outputs:
parameters: ${{ steps.parameters.outputs.result }}
Expand Down Expand Up @@ -91,6 +92,7 @@ jobs:
return parameters;
deploy:
name: Docs Deploy
runs-on: ubuntu-latest
needs: checks
if: ${{ fromJson(needs.checks.outputs.artifact).found && fromJson(needs.checks.outputs.parameters).shouldDeploy }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
deploy:
name: Docs Destroy
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: echo "should_force=${{ github.event_name == 'workflow_dispatch' }}" >> "$GITHUB_OUTPUT"

server-unit-tests:
name: Server
name: Test & Lint Server
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run_server == 'true' }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
if: ${{ !cancelled() }}

cli-unit-tests:
name: CLI
name: Unit Test CLI
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run_cli == 'true' }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
if: ${{ !cancelled() }}

cli-unit-tests-win:
name: CLI (Windows)
name: Unit Test CLI (Windows)
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run_cli == 'true' }}
runs-on: windows-latest
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
if: ${{ !cancelled() }}

web-unit-tests:
name: Web
name: Test & Lint Web
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run_web == 'true' }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -327,7 +327,7 @@ jobs:
if: ${{ !cancelled() }}

mobile-unit-tests:
name: Mobile
name: Unit Test Mobile
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run_mobile == 'true' }}
runs-on: ubuntu-latest
Expand All @@ -343,7 +343,7 @@ jobs:
run: flutter test -j 1

ml-unit-tests:
name: Machine Learning
name: Unit Test ML
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run_ml == 'true' }}
runs-on: ubuntu-latest
Expand Down

0 comments on commit 0d6bef2

Please sign in to comment.