-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (43 loc) · 1.44 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Test Charts
on:
pull_request:
types: [opened, synchronize]
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
submodules: recursive
- name: Set up Helm
uses: azure/setup-helm@v4.2.0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Set up chart-testing
uses: ./.github/actions/chart-testing-action
- name: Find changes (PR)
if: github.event_name == 'pull_request'
run: |
changed=$(ct list-changed --target-branch ${{ github.base_ref }})
if [[ -n "$changed" ]]; then
echo "test_scope=--target-branch ${{ github.base_ref }}" >> "$GITHUB_ENV"
fi
- name: Find changes (push)
if: github.event_name != 'pull_request'
run: |
echo "test_scope=--all" >> "$GITHUB_ENV"
- name: Run chart-testing (lint)
if: env.test_scope != ''
run: ct lint ${{ env.test_scope }} --validate-maintainers=false --check-version-increment=false
- name: Create kind cluster
if: env.test_scope != ''
uses: ./.github/actions/kind-action
- name: Run chart-testing (install)
if: env.test_scope != ''
run: ct install ${{ env.test_scope }}