-
-
Notifications
You must be signed in to change notification settings - Fork 102
78 lines (67 loc) · 1.87 KB
/
continuous-integration.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: Continuous Integration
on: pull_request
jobs:
kubernetes:
name: Kubernetes
runs-on: ubuntu-latest
strategy:
matrix:
deployment:
- kubernetes-sharedclient
- kubernetes-nosharedclient
- kubernetes-namespaced
- approle-env-vars
- approle-no-env-vars
- userpass
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Vault
run: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install vault
- name: Setup kind Cluster
run: ./hack/setup-kind.sh
- name: Run Test
run: ./hack/setup-kind-${{ matrix.deployment }}.sh
env:
VAULT_ADDR: http://127.0.0.1:8200
- name: Show Pod Status and Logs
if: ${{ always() }}
run: |
kubectl get pods --namespace vault
kubectl logs --namespace=vault vault-0
kubectl get pods --namespace vault-secrets-operator
kubectl logs --namespace=vault-secrets-operator -l app.kubernetes.io/instance=vault-secrets-operator
go:
name: Go
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: Download Dependencies
run: |
go mod download
- name: Test
run: |
make test
- name: Build
run: |
make build