|
| 1 | +--- |
1 | 2 | name: Lint and Test Helm Chart |
2 | | - |
3 | 3 | on: pull_request |
4 | | - |
5 | 4 | jobs: |
6 | 5 | lint-test: |
7 | 6 | runs-on: ubuntu-latest |
8 | 7 | steps: |
9 | | - - name: Checkout |
10 | | - uses: actions/checkout@v4 |
11 | | - with: |
12 | | - fetch-depth: 0 |
13 | | - |
14 | | - - name: Set up Helm |
15 | | - uses: azure/setup-helm@v4 |
16 | | - with: |
17 | | - version: v3.12.1 |
18 | | - |
19 | | - # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and |
20 | | - # yamllint (https://github.com/adrienverge/yamllint) which require Python |
21 | | - - name: Set up Python |
22 | | - uses: actions/setup-python@v5 |
23 | | - with: |
24 | | - python-version: '3.13' |
25 | | - check-latest: true |
26 | | - |
27 | | - - name: Set up chart-testing |
28 | | - |
29 | | - |
30 | | - - name: Run chart-testing (list-changed) |
31 | | - id: list-changed |
32 | | - run: | |
33 | | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) |
34 | | - if [[ -n "$changed" ]]; then |
35 | | - echo "changed=true" >> "$GITHUB_OUTPUT" |
36 | | - fi |
37 | | - - name: Run chart-testing (lint) |
38 | | - if: steps.list-changed.outputs.changed == 'true' |
39 | | - run: ct lint --target-branch ${{ github.event.repository.default_branch }} |
40 | | - |
41 | | - - name: Create kind cluster |
42 | | - if: steps.list-changed.outputs.changed == 'true' |
43 | | - |
44 | | - with: |
45 | | - version: v0.29.0 |
46 | | - |
47 | | - - name: Run chart-testing (install) |
48 | | - if: steps.list-changed.outputs.changed == 'true' |
49 | | - run: ct install --target-branch ${{ github.event.repository.default_branch }} |
| 8 | + - name: Checkout |
| 9 | + uses: actions/checkout@v4 |
| 10 | + with: |
| 11 | + fetch-depth: 0 |
| 12 | + - name: Set up Helm |
| 13 | + uses: azure/setup-helm@v4 |
| 14 | + with: |
| 15 | + version: v3.12.1 |
| 16 | + # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and |
| 17 | + # yamllint (https://github.com/adrienverge/yamllint) which require Python |
| 18 | + - name: Set up Python |
| 19 | + uses: actions/setup-python@v5 |
| 20 | + with: |
| 21 | + python-version: '3.13' |
| 22 | + check-latest: true |
| 23 | + - name: Set up chart-testing |
| 24 | + |
| 25 | + - name: Run chart-testing (list-changed) |
| 26 | + id: list-changed |
| 27 | + run: | |
| 28 | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) |
| 29 | + if [[ -n "$changed" ]]; then |
| 30 | + echo "changed=true" >> "$GITHUB_OUTPUT" |
| 31 | + fi |
| 32 | + - name: Run chart-testing (lint) |
| 33 | + if: steps.list-changed.outputs.changed == 'true' |
| 34 | + run: ct lint --target-branch ${{ github.event.repository.default_branch }} |
| 35 | + - name: Create kind cluster |
| 36 | + if: steps.list-changed.outputs.changed == 'true' |
| 37 | + |
| 38 | + with: |
| 39 | + version: v0.29.0 |
| 40 | + - name: Run chart-testing (install) |
| 41 | + if: steps.list-changed.outputs.changed == 'true' |
| 42 | + run: ct install --target-branch ${{ github.event.repository.default_branch }} |
0 commit comments