mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
ci: Update workflows
This commit is contained in:
parent
cd09fe983e
commit
1618705c6d
7 changed files with 104 additions and 58 deletions
22
.github/workflows/charts-test.yaml
vendored
22
.github/workflows/charts-test.yaml
vendored
|
@ -31,14 +31,16 @@ jobs:
|
|||
k8s_version:
|
||||
[
|
||||
"v1.29.13",
|
||||
"v1.30.9",
|
||||
"v1.31.5",
|
||||
"v1.32.1",
|
||||
"v1.30.11",
|
||||
"v1.31.7",
|
||||
"v1.32.3",
|
||||
]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Validate prerequisite folders
|
||||
working-directory: "charts/${{ matrix.chart }}"
|
||||
|
@ -59,8 +61,6 @@ jobs:
|
|||
kubectl: "${{ matrix.k8s_version }}"
|
||||
|
||||
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: "3.13"
|
||||
|
||||
- name: Set up chart-testing
|
||||
uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0
|
||||
|
@ -75,7 +75,7 @@ jobs:
|
|||
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
|
||||
|
||||
- name: Dereference JSON schema
|
||||
uses: bjw-s/helm-charts-actions/dereference-json-schema@main
|
||||
uses: bjw-s-labs/helm-charts-actions/dereference-json-schema@5f5c177be4f535e18c145dcbddcf819aab199b47
|
||||
with:
|
||||
schemaFile: "charts/${{ matrix.chart }}/values.schema.json"
|
||||
outputFile: "charts/${{ matrix.chart }}/values.schema.json"
|
||||
|
@ -87,7 +87,7 @@ jobs:
|
|||
working-directory: charts/${{ matrix.chart }}
|
||||
run: |
|
||||
yq -i '. |= .dependencies |= map(select(.name == "common" and .repository == "https://bjw-s-labs.github.io/helm-charts").version = ">0.0.0-0")' Chart.yaml
|
||||
yq -i '. |= .dependencies |= map(select(.name == "common" and .repository == "https://bjw-s-labs.github.io/helm-charts").repository = "file://${{ env.COMMON_LIBRARY_LOCATION }}")' Chart.yaml
|
||||
yq -i '. |= .dependencies |= map(select(.name == "common" and .repository == "https://bjw-s-labs.github.io/helm-charts").repository = "file://${COMMON_LIBRARY_LOCATION}")' Chart.yaml
|
||||
echo "::group::Modified Chart.yaml"
|
||||
cat Chart.yaml
|
||||
echo "::endgroup::"
|
||||
|
@ -99,7 +99,7 @@ jobs:
|
|||
cd "test-chart"
|
||||
fi
|
||||
|
||||
ct install --config "$GITHUB_WORKSPACE/.ci/ct/ct.yaml" --charts .
|
||||
ct install --config "${GITHUB_WORKSPACE}/.ci/ct/ct.yaml" --charts .
|
||||
|
||||
install_success:
|
||||
needs:
|
||||
|
@ -127,6 +127,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Validate prerequisite folders
|
||||
working-directory: "charts/${{ matrix.chart }}"
|
||||
|
@ -153,13 +155,15 @@ jobs:
|
|||
|
||||
- name: Run tests
|
||||
working-directory: "charts/${{ matrix.chart }}"
|
||||
env:
|
||||
MATRIX_CHART: ${{ matrix.chart }}
|
||||
run: |
|
||||
if [[ -d "test-chart" ]]; then
|
||||
cd "test-chart"
|
||||
fi
|
||||
|
||||
if [[ ! -d "unittests" ]]; then
|
||||
echo "No unit tests found for chart ${{ matrix.chart }}"
|
||||
echo "No unit tests found for chart ${MATRIX_CHART}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue