-
Notifications
You must be signed in to change notification settings - Fork 14
63 lines (61 loc) · 1.61 KB
/
warden-verify.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
name: warden verify
on:
push:
branches: [ "main", "release-*" ]
workflow_dispatch:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: true
- uses: golangci/golangci-lint-action@v3
with:
version: v1.54
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: true
- name: unit test
run: make test
integration-test:
needs: unit-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Single Cluster
uses: AbsaOSS/k3d-action@4e8b3239042be1dc0aed6c5eb80c13b18200fc79 #v2.4.0
with:
cluster-name: "k3dCluster"
args: >-
--agents 1
--port 80:80@loadbalancer
--port 443:443@loadbalancer
--wait
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: true
- name: setup pre-submit envs
if: github.event_name == 'pull_request'
run: |
echo "IMG_DIRECTORY=dev" >> $GITHUB_ENV
echo "IMG_VERSION=PR-${{ github.event.number }}" >> $GITHUB_ENV
- name: setup post-submit envs
if: github.event_name == 'push'
run: |
echo "IMG_DIRECTORY=prod" >> $GITHUB_ENV
echo "IMG_VERSION=${{github.sha}}" >> $GITHUB_ENV
- name: run test
run: make verify-on-cluster
- name: Show Warden Logs
if: failure()
run: kubectl logs -l app=warden -n kyma-system --prefix=true;