|
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!
|
|
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: rin action to test a helm chart |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 |
| 75 | + |
| 76 | + - name: Set up Helm |
| 77 | + uses: azure/setup-helm@v3 |
| 78 | + with: |
| 79 | + version: v3.14.4 |
| 80 | + |
| 81 | + - uses: actions/setup-python@v4 |
| 82 | + with: |
| 83 | + python-version: '3.x' |
| 84 | + check-latest: true |
| 85 | + |
| 86 | + - name: Install chart-testing |
| 87 | + uses: ./ |
| 88 | + |
| 89 | + - run: | |
| 90 | + sed -i "s/version: .*/version: 2.0.0/" testdata/simple-deployment/Chart.yaml |
| 91 | + cat testdata/simple-deployment/Chart.yaml |
| 92 | +
|
| 93 | + - name: Run chart-testing (list-changed) |
| 94 | + id: list-changed |
| 95 | + run: | |
| 96 | + changed=$(ct list-changed --chart-dirs=./testdata --target-branch ${{ github.event.repository.default_branch }}) |
| 97 | + if [[ -n "$changed" ]]; then |
| 98 | + echo "changed=true" >> "$GITHUB_OUTPUT" |
| 99 | + fi |
| 100 | +
|
| 101 | + - name: Run chart-testing (lint) |
| 102 | + if: steps.list-changed.outputs.changed == 'true' |
| 103 | + run: ct lint --chart-dirs=./testdata --target-branch ${{ github.event.repository.default_branch }} |
| 104 | + |
| 105 | + - name: Create kind cluster |
| 106 | + if: steps.list-changed.outputs.changed == 'true' |
| 107 | + |
| 108 | + |
| 109 | + - name: Run chart-testing (install) |
| 110 | + if: steps.list-changed.outputs.changed == 'true' |
| 111 | + run: ct install --chart-dirs=./testdata --target-branch ${{ github.event.repository.default_branch }} |
0 commit comments