-
Notifications
You must be signed in to change notification settings - Fork 16
93 lines (91 loc) · 2.86 KB
/
Copy pathvalidation.yml
File metadata and controls
93 lines (91 loc) · 2.86 KB
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
name: validation
on: [push, pull_request]
# Permission forced by repo-level setting; only elevate on job-level
permissions:
contents: read
# packages: read
env:
GO111MODULE: "on"
PROJECTNAME: "extendeddaemonset"
GO_VERSION: 1.26.2
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # needed for dd-sts OIDC token exchange
steps:
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Install required packages
uses: mstksg/get-package@4eda30bb5c6ac62c0f3921dd5884b6ef8fc89ab2 # v1.0.0
with:
apt-get: mercurial jq build-essential
- name: Check out code into the Go module directory
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install tools
run: |
make install-tools
- name: Run build
run: |
make manager
- name: Run unit/control plane tests (fake cluster)
run: |
make test
- name: Get Datadog credentials
id: dd-sts
continue-on-error: true
uses: DataDog/dd-sts-action@2e8187910199bd93129520183c093e19aa585c75 # v1.0.0
with:
policy: extendeddaemonset
- name: Upload coverage to Datadog
if: steps.dd-sts.outputs.api_key != ''
continue-on-error: true
uses: DataDog/coverage-upload-github-action@d2cf302a39c05e0ad22063360a2bf6ce0cc4906c # v1
with:
api_key: ${{ steps.dd-sts.outputs.api_key }}
files: cover.out
format: go-coverprofile
flags: unittests
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
k8s:
- v1.14.10
- v1.16.9
- v1.18.4
- v1.21.1
- v1.22.12
- v1.23.12
- v1.24.11
steps:
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Install required packages
uses: mstksg/get-package@4eda30bb5c6ac62c0f3921dd5884b6ef8fc89ab2 # v1.0.0
with:
apt-get: mercurial jq build-essential
- name: Check out code into the Go module directory
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install tools
run: |
make install-tools
- name: Setup kind for e2e - kube ${{ matrix.k8s }}
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
with:
config: test/cluster-kind.yaml
cluster_name: eds-e2e
wait: 600s
- name: Run e2e tests - kube ${{ matrix.k8s }}
run: |
export PATH=$PATH:$(pwd)/bin
kubectl cluster-info --context kind-eds-e2e
kubectl get pods -n kube-system
make e2e