-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (54 loc) · 1.74 KB
/
testing.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
---
name: Testing charts
on:
push:
branches:
- '*'
- '!main'
pull_request:
types:
- opened
- synchronize
- edited
- reopened
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Install yamllint
run: pip install yamllint
- name: Lint YAML files
run: yamllint .
test-charts:
needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4.7.1
- uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Get changed files in the charts folder
id: changed-files-specific
uses: tj-actions/changed-files@v39
with:
files: charts
- name: Create k8s Kind Cluster
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: helm/kind-action@v1.8.0
- name: Install kubectl
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: Azure/setup-kubectl@v3
- name: Run lint for any chart concerned by the commit
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
.github/workflows/lint_modified_charts.sh ${{ steps.changed-files-specific.outputs.all_changed_files }}
- name: Run test for any chart concerned by the commit
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
.github/workflows/deploy_modified_charts.sh ${{ steps.changed-files-specific.outputs.all_changed_files }}