Skip to content

Commit

Permalink
Use generic status checker
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoColomb authored Dec 24, 2024
1 parent 2a2c381 commit 100da0d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,28 @@ jobs:
test:
name: Test
if: needs.prepare.outputs.changed == 'true'
needs:
- prepare
uses: ./.github/workflows/test.yml
with:
action-matrix: '["lint", "install", "install --upgrade"]'
contains-changes: ${{ needs.prepare.outputs.changed == 'true' }}
secrets: inherit

results:
name: Status
if: always()
runs-on: ubuntu-latest
needs:
- prepare
- test
steps:
- run: exit 1
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
release:
name: Release
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,11 @@ on:
default: '["install"]'
type: string
description: Matrix of actions to run
contains-changes:
required: false
default: true
type: boolean
description: The ref contains changes requiring tests

jobs:
ct:
name: Run chart-testing
runs-on: ubuntu-latest
if: inputs.contains-changes
strategy:
fail-fast: false
matrix:
Expand All @@ -45,7 +39,7 @@ jobs:

- name: Create kind cluster
uses: helm/[email protected]
if: startsWith(matrix.action, 'install')
if: contains(matrix.action, 'install')

- name: Run chart-testing (${{ matrix.action }})
run: ct ${{ matrix.action }} --config config.yaml --debug

0 comments on commit 100da0d

Please sign in to comment.