File tree Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : test
2
+ on :
3
+ pull_request :
4
+ types : [opened, edited, synchronize, reopened]
5
+ branches :
6
+ - main
7
+
8
+ permissions :
9
+ # Required: allow read access to the content for analysis.
10
+ contents : read
11
+ # Optional: allow read access to pull request. Use with `only-new-issues` option.
12
+ pull-requests : read
13
+ # Optional: Allow write access to checks to allow the action to annotate code in the PR.
14
+ checks : write
15
+
16
+ jobs :
17
+ test :
18
+ name : make test
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
22
+ - name : Calculate go version
23
+ id : vars
24
+ run : echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
25
+ - name : Set up Go
26
+ uses : actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # tag=v5.3.0
27
+ with :
28
+ go-version : ${{ steps.vars.outputs.go_version }}
29
+ - name : make test
30
+ run : MAKEFLAGS="-s" make test
Original file line number Diff line number Diff line change @@ -36,17 +36,16 @@ header_text "installing envtest tools@${ENVTEST_K8S_VERSION} with setup-envtest
36
36
tmp_bin=/tmp/cr-tests-bin
37
37
(
38
38
# don't presume to install for the user
39
- cd ${hack_dir} /../tools/setup-envtest
40
- GOBIN=${tmp_bin} go install .
39
+ GOBIN=${tmp_bin} go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
41
40
)
42
41
export KUBEBUILDER_ASSETS=" $( ${tmp_bin} /setup-envtest use --use-env -p path " ${ENVTEST_K8S_VERSION} " ) "
43
42
44
43
# Run tests.
45
44
${hack_dir} /test-all.sh
46
45
47
46
header_text " confirming examples compile (via go install)"
48
- go install ${MOD_OPT} ./examples/builtins
49
- go install ${MOD_OPT} ./examples/crd
47
+ pushd examples/kind ; go install ${MOD_OPT} . ; popd
48
+ pushd examples/namespace ; go install ${MOD_OPT} . ; popd
50
49
51
50
echo " passed"
52
51
exit 0
You can’t perform that action at this time.
0 commit comments