-
Notifications
You must be signed in to change notification settings - Fork 12
90 lines (71 loc) · 2.54 KB
/
lint-and-test-charts.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Lint, Test, Autorelease Charts
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Add bitnami repo for dependencies
run: helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Add browserless-chrome repo for dependencies
run: helm repo add browserless-chrome https://charts.sagikazarmark.dev
- name: Run chart-testing (lint)
run: ct lint --all
test:
runs-on: ubuntu-latest
strategy:
matrix:
# When changing versions here, check that the version exists at: https://hub.docker.com/r/kindest/node/tags?page=1&ordering=last_updated
k8s:
- v1.20.2
- v1.21.2
- v1.22.5
- v1.23.3
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.7.2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.k8s }}
- name: Add browserless-chrome repo for dependencies
run: helm repo add browserless-chrome https://charts.sagikazarmark.dev
- name: Install PostgreSQL dependency
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install lightdashdb bitnami/postgresql --set auth.username=lightdash,auth.password=changeme,auth.database=lightdash --set primary.persistence.enabled=false
- name: Run chart-testing (install)
run: ct install --config .github/ct-install.yaml --all
automerge:
needs: [lint, test]
if: ${{ contains(github.event.pull_request.labels, 'merge after testing') }}
runs-on: ubuntu-latest
steps:
- name: automerge
uses: "pascalgn/[email protected]"
env:
MERGE_LABELS: "merge after testing"
MERGE_METHOD: squash
MERGE_COMMIT_MESSAGE: pull-request-title
MERGE_FORKS: false
MERGE_DELETE_BRANCH: true
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"