forked from kgateway-dev/kgateway
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (64 loc) · 2.3 KB
/
pr.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
name: GGII Tests
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
test_gloo_gateway:
name: Build and Test Gloo Gateway
runs-on: ubuntu-22.04
timeout-minutes: 10
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Build
run: go build -v ./projects/gateway2/... ./projects/gloo/cli/cmd
- name: Install utils for env tests
run: make -C ./projects/gateway2/ install-go-tools
- name: Test with the Go CLI
run: go test ./projects/gateway2/...
conformance:
name: Run Gateway api conformance tests
runs-on: ubuntu-22.04
timeout-minutes: 15
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Install kind
uses: helm/[email protected]
with:
install_only: true
version: v0.20.0
- name: Set up cluster and helm chart
run: ./ci/kind/setup-kind.sh
- name: Additional cluster setup
run: ./projects/gateway2/kind.sh
- name: Install Gloo Gateway
run: helm upgrade -i -n gloo-system gloo ./_test/gloo-1.0.0-ci1.tgz --create-namespace
- name: Pre-test cleanup of resources
run: kubectl delete rs --all
- name: Test Conformance
run: make -C ./projects/gateway2/ conformance
- name: save results
if: ${{ failure() }}
shell: bash
run: |
mkdir -p _output/conformance-artifacts
[ -f _output/conformance-artifacts/test-out.txt ] || touch _output/conformance-artifacts/test-out.txt
echo "kubectl get pods -A" >> _output/conformance-artifacts/test-out.txt
kubectl get pods -A >> _output/conformance-artifacts/test-out.txt
echo "kubectl logs -n gloo-system deployment/gloo --all-containers=true" >> _output/conformance-artifacts/test-out.txt
kubectl logs -n gloo-system deployment/gloo --all-containers=true >> _output/conformance-artifacts/test-out.txt
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: conformance-kube-dump
path: "_output/conformance-artifacts"
if-no-files-found: warn