|
9 | 9 |
|
10 | 10 | name: Install chart-testing and test presence in path |
11 | 11 | steps: |
12 | | - - uses: actions/checkout@v4 |
| 12 | + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
13 | 13 | - name: Install chart-testing |
14 | 14 | uses: ./ |
15 | 15 | - name: Check install! |
16 | 16 | run: | |
17 | 17 | ct version |
18 | 18 | CT_VERSION_OUTPUT=$(ct version 2>&1 /dev/null) |
19 | 19 | ACTUAL_VERSION=$(echo "$CT_VERSION_OUTPUT" | grep Version | rev | cut -d ' ' -f1 | rev) |
20 | | - if [[ $ACTUAL_VERSION != 'v3.10.1' ]]; then |
21 | | - echo 'should be v3.10.1' |
| 20 | + if [[ $ACTUAL_VERSION != 'v3.11.0' ]]; then |
| 21 | + echo 'should be v3.11.0' |
22 | 22 | exit 1 |
23 | 23 | else |
24 | 24 | exit 0 |
|
38 | 38 |
|
39 | 39 | name: Install Custom chart-testing and test presence in path |
40 | 40 | steps: |
41 | | - - uses: actions/checkout@v4 |
| 41 | + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
42 | 42 | - name: Install chart-testing |
43 | 43 | uses: ./ |
44 | 44 | with: |
|
65 | 65 | else |
66 | 66 | exit 0 |
67 | 67 | fi |
| 68 | +
|
| 69 | + test_ct_action_with_helm: |
| 70 | + runs-on: ubuntu-latest |
| 71 | + |
| 72 | + name: run action to test a helm chart |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
| 75 | + with: |
| 76 | + fetch-depth: 0 |
| 77 | + |
| 78 | + - name: Set up Helm |
| 79 | + uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0 |
| 80 | + with: |
| 81 | + version: v3.14.4 |
| 82 | + |
| 83 | + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 |
| 84 | + with: |
| 85 | + python-version: '3.x' |
| 86 | + check-latest: true |
| 87 | + |
| 88 | + - name: Install chart-testing |
| 89 | + uses: ./ |
| 90 | + |
| 91 | + - run: | |
| 92 | + sed -i "s/version: .*/version: 2.0.0/" testdata/simple-deployment/Chart.yaml |
| 93 | + cat testdata/simple-deployment/Chart.yaml |
| 94 | +
|
| 95 | + - name: Run chart-testing (list-changed) |
| 96 | + id: list-changed |
| 97 | + run: | |
| 98 | + changed=$(ct list-changed --chart-dirs=testdata --target-branch ${{ github.event.repository.default_branch }}) |
| 99 | + if [[ -n "$changed" ]]; then |
| 100 | + echo "changed=true" >> "$GITHUB_OUTPUT" |
| 101 | + fi |
| 102 | +
|
| 103 | + - name: Run chart-testing (lint) |
| 104 | + if: steps.list-changed.outputs.changed == 'true' |
| 105 | + run: ct lint --chart-dirs=testdata --target-branch ${{ github.event.repository.default_branch }} |
| 106 | + |
| 107 | + - name: Create kind cluster |
| 108 | + if: steps.list-changed.outputs.changed == 'true' |
| 109 | + uses: helm/kind-action@v1.10.0 |
| 110 | + |
| 111 | + - name: Run chart-testing (install) |
| 112 | + if: steps.list-changed.outputs.changed == 'true' |
| 113 | + run: ct install --chart-dirs=testdata --target-branch ${{ github.event.repository.default_branch }} |
0 commit comments