2121 go-version-file : go.mod
2222 cache-dependency-path : go.sum
2323
24- - name : Resolve image versions
25- id : images
26- run : |
27- gw_sha=$(curl -sSfL -H "Authorization: Bearer ${{ github.token }}" \
28- https://api.github.com/repos/nantian-gw/gateway/commits/main | jq -r .sha | cut -c1-7)
29- dp_sha=$(curl -sSfL -H "Authorization: Bearer ${{ github.token }}" \
30- https://api.github.com/repos/nantian-gw/dataplane/commits/main | jq -r .sha | cut -c1-7)
31- db_sha=$(curl -sSfL -H "Authorization: Bearer ${{ github.token }}" \
32- https://api.github.com/repos/nantian-gw/dashboard/commits/main | jq -r .sha | cut -c1-7)
33- echo "gateway_sha=${gw_sha}" >> $GITHUB_OUTPUT
34- echo "dataplane_sha=${dp_sha}" >> $GITHUB_OUTPUT
35- echo "dashboard_sha=${db_sha}" >> $GITHUB_OUTPUT
36- echo "gateway: ${gw_sha} dataplane: ${dp_sha} dashboard: ${db_sha}"
37-
3824 - name : Create kind cluster
3925 run : |
4026 kind create cluster --name conformance --wait 5m
@@ -47,26 +33,17 @@ jobs:
4733
4834 - name : Deploy nantian-gw
4935 run : |
50- cp -r deploy/kubernetes/overlays/kind-conformance /tmp/overlay
51- kustomize edit set image \
52- nantian-controlplane=ghcr.io/nantian-gw/nantian-controlplane:sha-${{ steps.images.outputs.gateway_sha }} \
53- nantian-dataplane=ghcr.io/nantian-gw/dataplane:sha-${{ steps.images.outputs.dataplane_sha }} \
54- nantian-gw-dashboard=ghcr.io/nantian-gw/dashboard:sha-${{ steps.images.outputs.dashboard_sha }} \
55- -e /tmp/overlay
56- kubectl apply -k /tmp/overlay
36+ kubectl apply -k deploy/kubernetes/overlays/kind-conformance
5737 kubectl wait --for=condition=ready pod --all -n nantian-gw --timeout=300s
5838
59- - name : Run conformance tests
60- env :
61- GATEWAY_IMAGE_SHA : ${{ steps.images.outputs.gateway_sha }}
62- DATAPLANE_IMAGE_SHA : ${{ steps.images.outputs.dataplane_sha }}
63- DASHBOARD_IMAGE_SHA : ${{ steps.images.outputs.dashboard_sha }}
39+ - name : Record image versions
6440 run : |
6541 echo "=== Images under test ==="
66- echo " controlplane: ghcr.io/nantian-gw/nantian-controlplane:sha-${GATEWAY_IMAGE_SHA}"
67- echo " dataplane: ghcr.io/nantian-gw/dataplane:sha-${DATAPLANE_IMAGE_SHA}"
68- echo " dashboard: ghcr.io/nantian-gw/dashboard:sha-${DASHBOARD_IMAGE_SHA}"
69- go test -tags=conformance -count=1 -v -timeout 30m ./conformance/
42+ kubectl get pods -n nantian-gw -o json | jq -r '.items[] | .spec.containers[] | " \(.name): \(.image)"'
43+ echo "=== Image digests ==="
44+ kubectl get pods -n nantian-gw -o json | jq -r '.items[] | .status.containerStatuses[] | " \(.name): \(.imageID)"'
45+
46+ - name : Run conformance tests
7047
7148 - name : Collect logs on failure
7249 if : failure()
0 commit comments