-
Notifications
You must be signed in to change notification settings - Fork 74
44 lines (40 loc) · 1004 Bytes
/
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
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: build
run: make build
unit-test:
runs-on: ubuntu-latest
env:
SKIP_TESTS: true
steps:
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: cluster
- name: Set k8s provider
run: |
kubectl create namespace test-namespace
kubectl create secret generic mysecret -n test-namespace --from-literal=key=p4ssw0rd
kubectl create configmap myconfigmap -n test-namespace --from-literal=key=configValue
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: test
run: make test