-
Notifications
You must be signed in to change notification settings - Fork 117
130 lines (105 loc) · 3.04 KB
/
checks.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Checks
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
go-build:
name: Go Build
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build Golang
run: make ci-go-build
timeout-minutes: 15
go-test:
name: Go Test
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Unit Test Golang
run: make ci-go-test
timeout-minutes: 15
go-lint:
name: Go Lint
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Golang Style and Lint Check
run: make ci-go-check
timeout-minutes: 15
deploy:
name: Push Latest Release
if: github.ref == 'refs/heads/main' # only true for pushes to `main`
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build and Push
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
# Only run if required secrets are provided
if: ${{ env.DOCKER_USER && env.DOCKER_PASSWORD }}
run: make deploy-ci
e2e:
name: Istio End-to-End Test
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build docker image
run: make ci-go-build ci-go-build-linux-static image-quick tag-latest
- name: Setup kind/istio
run: |
# install kind, kubectl, istio
make test-cluster
# Install bats
sudo apt-get update -y
sudo apt-get install -y bats
# Make docker image available to k8s
kind load docker-image openpolicyagent/opa:latest-istio
- name: Run e2e tests
run: make test-e2e
timeout-minutes: 10
- name: Cleanup
run: kind delete cluster
e2e-envoy-grpc:
name: Envoy gRPC End-to-End Test
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build docker image
run: make ci-go-build ci-go-build-linux-static image-quick tag-latest
- name: Build testsrv docker image
run: make testsrv-image
working-directory: examples/grpc
- name: Run test
run: make test-setup test
working-directory: examples/grpc
- name: Run test log dump and cleanup
run: make test-teardown
if: ${{ always() }}
working-directory: examples/grpc
proxy-init-build:
# Make sure that the proxy_init container is able to build successfully.
name: Build proxy_init container
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Workaround Buildx Errors
run: build/buildx_workaround.sh
- name: Build proxy_init
run: make -C proxy_init build