-
Notifications
You must be signed in to change notification settings - Fork 1k
78 lines (77 loc) · 2.19 KB
/
go-test.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
name: Go Test
on:
push:
paths:
- 'test/datadog-operator/**'
- 'charts/datadog-operator/**'
pull_request:
paths:
- 'test/datadog-operator/**'
- 'charts/datadog-operator/**'
env:
GO111MODULE: "on"
PROJECTNAME: "helm-charts"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.20
id: go
- name: Set up Helm
uses: azure/setup-helm@v3.5
with:
version: v3.10.1
- name: Add Datadog Helm repo
run: helm repo add datadog https://helm.datadoghq.com && helm repo update
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: run Go tests
run: |
helm dependency build ./charts/datadog-operator
make unit-test-operator
integ-tests:
if: ${{github.event.pull_request.head.repo.full_name == github.repository }}
name: integ-tests
runs-on: ubuntu-20.04
strategy:
matrix:
k8s:
- v1.16.15
- v1.18.20
- v1.22.9
- v1.24.2
- v1.25.2
- v1.26.6
- v1.27.3
- v1.28.7
- v1.29.2
- v1.30.0
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/kind-action@v1.5.0
with:
node_image: kindest/node:${{ matrix.k8s }}
cluster_name: operator-ci-${{ matrix.k8s }}
config: .github/kind_config.yaml
- name: Add Cert Manager Helm repo
run: helm repo add jetstack https://charts.jetstack.io && helm repo update
- name: Add Datadog Helm repo
run: helm repo add datadog https://helm.datadoghq.com && helm repo update
- name: Run integ tests
env:
API_KEY: ${{ secrets.GO_INTEG_TEST_API_KEY }}
APP_KEY: ${{ secrets.GO_INTEG_TEST_APP_KEY }}
CLUSTER_NAME: operator-ci-${{ matrix.k8s }}
K8S_VERSION: ${{ matrix.k8s }}
run: |
kubectl cluster-info
kubectl get nodes
helm dependency build ./charts/datadog-operator
make integration-test