-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (45 loc) · 1.85 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
name: Lint and Test Charts
on: pull_request
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Linelint
uses: actions/linelint@master
- 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: Helm Installation
uses: azure/setup-helm@v3
- uses: actions/setup-python@main
with:
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@main
- name: Run chart-testing (lint)
run: ct lint --validate-maintainers=false --chart-repos bitnami=https://charts.bitnami.com/bitnami/ --chart-dirs . --charts . --target-branch ${{ github.event.repository.default_branch }}
- 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
- 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 }}