-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Marco Franssen <[email protected]>
- Loading branch information
1 parent
0832f33
commit 9cc2089
Showing
1 changed file
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,59 @@ name: Test Charts | |
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/test.yml" | ||
- "charts/**" | ||
|
||
jobs: | ||
build-matrix: | ||
name: Find charts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Find charts | ||
id: build-matrix | ||
run: | | ||
charts=$(find charts -type f -name 'Chart.yaml' | sed -r 's|/[^/]+$||' | sort | uniq | jq -c --slurp --raw-input 'split("\n") | map(select(. != ""))') | ||
echo "charts=$charts" >> $GITHUB_OUTPUT | ||
outputs: | ||
charts: ${{ steps.build-matrix.outputs.charts }} | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: [build-matrix] | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
chart: ${{ fromJson(needs.build-matrix.outputs.charts) }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # [email protected] | ||
with: | ||
version: v3.10.3 | ||
|
||
- name: Setup Sigstore Helm repo | ||
run: | | ||
helm repo add sigstore https://sigstore.github.io/helm-charts | ||
helm repo update | ||
- name: Check lock file updated | ||
run: | | ||
helm dependency update . && helm dependency build . | ||
git diff --exit-code | ||
working-directory: ${{ matrix.chart }} | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -17,7 +67,7 @@ jobs: | |
- name: Set up Helm | ||
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # [email protected] | ||
with: | ||
version: v3.10.0 | ||
version: v3.10.3 | ||
|
||
- uses: actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912 # pin@v4 | ||
with: | ||
|