-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.31 KB
/
helm-lint-and-test.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
66
67
68
69
70
71
name: Lint and Test Charts
on:
schedule:
- cron: "0 0 * * *" # Every day at 00:00
push:
branches:
- "main"
pull_request:
branches: "*"
paths-ignore:
- LICENSE
- '*.md'
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Helm Installation
uses: azure/setup-helm@v3
- uses: actions/setup-python@main
with:
check-latest: true
cache: 'pip' # caching pip dependencies
- name: Install helm chart testing
uses: helm/chart-testing-action@main
- name: Run chart-testing (lint)
run: ct lint --validate-maintainers=false --chart-dirs . --charts . --target-branch ${{ github.event.repository.default_branch }}
- name: Validate the Kubernetes manifest with yannh/kubeconform
run: |
helm plugin install https://github.com/jtyr/kubeconform-helm
sudo pip install --break-system-packages pyyaml
helm kubeconform --values-dir mviewer/ci --summary mviewer
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: false
- name: k3s install + add more swap
run: |
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -
sudo dd if=/dev/zero of=/swapfile bs=1M count=8k status=progress
sudo chmod 0600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free -h
until KUBECONFIG=/etc/rancher/k3s/k3s.yaml kubectl get --raw='/readyz?verbose'; do echo "wait for k3s to finish"; done
kubectl taint nodes -l kubernetes.io/os=linux key1=value1:NoSchedule
- name: Run chart-testing (install)
run: |
KUBECONFIG=/etc/rancher/k3s/k3s.yaml ct install --chart-dirs . --charts . --helm-extra-args '--timeout 7200s' --target-branch ${{ github.event.repository.default_branch }}