-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (75 loc) · 2.23 KB
/
test.yml
File metadata and controls
94 lines (75 loc) · 2.23 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Run tests
on:
push:
branches-ignore:
- main
env:
HELM_DOCS_VERSION: '1.5.0'
jobs:
helm-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# TODO use Docker image if GitHub Actions ever allows mounting the source directory as a volume
- name: Download helm-docs
run: |
curl -sSL https://github.com/norwoodj/helm-docs/releases/download/v${{ env.HELM_DOCS_VERSION }}/helm-docs_${{ env.HELM_DOCS_VERSION }}_Linux_x86_64.tar.gz | \
tar xzf - helm-docs
- name: Update docs
run: |
for chart in charts/*; do
pushd $chart && $GITHUB_WORKSPACE/helm-docs -o README.md.new; popd
done
- name: Check diff output
run: |
git diff-index --name-only --exit-code HEAD
chart-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.0.1
with:
version: v3.4.0
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml
# TODO test install
# - name: Create kind cluster
# uses: helm/kind-action@v1.1.0
# if: steps.list-changed.outputs.changed == 'true'
# - name: Run chart-testing (install)
# run: ct install --config ct.yaml
kubeconform:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate and validate releases
uses: docker://ghcr.io/shivjm/helm-kubeconform-action:v0.1.0
env:
ADDITIONAL_SCHEMA_PATHS: |
schemas/{{ .ResourceKind }}.json
CHARTS_DIRECTORY: "charts"
KUBECONFORM_STRICT: "true"
HELM_UPDATE_DEPENDENCIES: "true"