This repository was archived by the owner on Oct 9, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +36
-20
lines changed
Expand file tree Collapse file tree 5 files changed +36
-20
lines changed Original file line number Diff line number Diff line change 6868 with :
6969 version : latest
7070 args : --snapshot --skip-publish --rm-dist
71+
72+ generate :
73+ runs-on : ubuntu-latest
74+ steps :
75+ - uses : actions/checkout@v1
76+ - uses : actions/setup-go@v2
77+ with :
78+ go-version : ' 1.16'
79+ - name : Go generate and diff
80+ run : DELTA_CHECK=true make generate
Original file line number Diff line number Diff line change @@ -7,9 +7,6 @@ update_boilerplate:
77 @curl https://raw.githubusercontent.com/flyteorg/boilerplate/master/boilerplate/update.sh -o boilerplate/update.sh
88 @boilerplate/update.sh
99
10- generate : download_tooling
11- @go generate ./...
12-
1310clean :
1411 rm -rf bin
1512
Original file line number Diff line number Diff line change @@ -15,22 +15,5 @@ git clone https://github.com/flyteorg/flyte.git "${OUT}"
1515
1616pushd ${OUT}
1717
18- if [ ! -z " $IMAGE " ];
19- then
20- kind load docker-image ${IMAGE}
21- if [ " ${IMAGE_NAME} " == " flytepropeller" ]
22- then
23- sed -i.bak -e " s_${IMAGE_NAME} :.*_${IMAGE} _g" " ${OUT} " /kustomize/base/propeller/deployment.yaml
24- fi
25-
26- if [ " ${IMAGE_NAME} " == " flyteadmin" ]
27- then
28- sed -i.bak -e " s_${IMAGE_NAME} :.*_${IMAGE} _g" " ${OUT} " /kustomize/base/admindeployment/deployment.yaml
29- fi
30- fi
31-
32- make kustomize
33- # launch flyte end2end
34- kubectl apply -f " ${OUT} /deployment/test/flyte_generated.yaml"
3518make end2end_execute
3619popd
Original file line number Diff line number Diff line change 88download_tooling : # download dependencies (including test deps) for the package
99 @boilerplate/flyte/golang_test_targets/download_tooling.sh
1010
11+ .PHONY : generate
12+ generate : download_tooling # generate go code
13+ @boilerplate/flyte/golang_test_targets/go-gen.sh
14+
1115.PHONY : lint
1216lint : download_tooling # lints the package for common code smells
1317 GL_DEBUG=linters_output,env golangci-lint run --deadline=5m --exclude deprecated -v
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -ex
4+
5+ echo " Running go generate"
6+ go generate ./...
7+
8+ # This section is used by GitHub workflow to ensure that the generation step was run
9+ if [ -n " $DELTA_CHECK " ]; then
10+ DIRTY=$( git status --porcelain)
11+ if [ -n " $DIRTY " ]; then
12+ echo " FAILED: Go code updated without commiting generated code."
13+ echo " Ensure make generate has run and all changes are committed."
14+ DIFF=$( git diff)
15+ echo " diff detected: $DIFF "
16+ DIFF=$( git diff --name-only)
17+ echo " files different: $DIFF "
18+ exit 1
19+ else
20+ echo " SUCCESS: Generated code is up to date."
21+ fi
22+ fi
You can’t perform that action at this time.
0 commit comments