-
Notifications
You must be signed in to change notification settings - Fork 280
138 lines (115 loc) · 3.54 KB
/
ci.yaml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
name: CI
env:
VERSION_GO: '1.20.12'
VERSION_HELM: 'v3.13.3'
on:
pull_request:
push:
branches:
- master
jobs:
build:
name: "Build & Test"
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ env.VERSION_GO }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: make bootstrap
- name: Run unit tests
run: make test
- name: Verify installation
run: |
mkdir -p helmhome
make install HELM_HOME=helmhome
helmhome/plugins/helm-diff/bin/diff version
helm-install:
name: helm install
if: "!contains(github.event.head_commit.message, '[ci skip]')"
needs: [build]
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
shell: [ default ]
experimental: [ false ]
include:
- os: windows-latest
shell: wsl
experimental: false
- os: windows-latest
shell: cygwin
experimental: false
- os: ubuntu-latest
container: alpine
shell: sh
experimental: false
steps:
- name: Disable autocrlf
if: "contains(matrix.os, 'windows-latest')"
run: |-
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- name: Setup Helm
uses: azure/[email protected]
with:
version: ${{ env.VERSION_HELM }}
- name: Setup WSL
if: "contains(matrix.shell, 'wsl')"
uses: Vampire/setup-wsl@v1
- name: Setup Cygwin
if: "contains(matrix.shell, 'cygwin')"
uses: egor-tensin/setup-cygwin@v3
with:
platform: x64
- name: helm plugin install
run: helm plugin install .
integration-tests:
name: Integration Tests
if: "!contains(github.event.head_commit.message, '[ci skip]')"
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: engineerd/[email protected]
with:
version: "v0.11.1"
- uses: actions/checkout@v2
- name: Setup Helm
uses: azure/[email protected]
with:
version: ${{ env.VERSION_HELM }}
- name: helm plugin install
run: helm plugin install .
- name: helm create helm-diff
run: helm create helm-diff
- name: helm diff upgrade --install helm-diff ./helm-diff
run: helm diff upgrade --install helm-diff ./helm-diff
- name: helm upgrade -i helm-diff ./helm-diff
run: helm upgrade -i helm-diff ./helm-diff
- name: helm diff upgrade -C 3 --set replicaCount=2 --install helm-diff ./helm-diff
run: helm diff upgrade -C 3 --set replicaCount=2 --install helm-diff ./helm-diff
shell-lint:
name: Lint install-binary.sh
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
continue-on-error: true
steps:
- uses: actions/[email protected]
- uses: luizm/[email protected]
with:
sh_checker_exclude: "scripts"
sh_checker_checkbashisms_enable: true