@@ -35,18 +35,21 @@ jobs:
35
35
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36
36
with :
37
37
fetch-depth : 100
38
- - name : " Set GO env"
38
+ - if : ${{ matrix.canary }}
39
+ name : " Init (canary): retrieve GO_VERSION"
39
40
run : |
40
- if [ "${{ matrix.canary }}" != "" ]; then
41
- . ./hack/provisioning/version/fetch.sh
42
- printf "GO_VERSION=%s\n" "$(go::canary::for::go-setup)" >> "$GITHUB_ENV"
43
- fi
44
- - name : " Install go"
41
+ latest_go="$(. ./hack/provisioning/version/fetch.sh; go::canary::for::go-setup)"
42
+ printf "GO_VERSION=%s\n" "$latest_go" >> "$GITHUB_ENV"
43
+ [ "$latest_go" != "" ] || \
44
+ echo "::warning title=No canary go::There is currently no canary go version to test. Steps will not run."
45
+ - if : ${{ env.GO_VERSION != '' }}
46
+ name : " Install go"
45
47
uses : actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
46
48
with :
47
49
go-version : ${{ env.GO_VERSION }}
48
50
check-latest : true
49
- - name : " Install tools"
51
+ - if : ${{ env.GO_VERSION != '' }}
52
+ name : " Install tools"
50
53
run : |
51
54
cd mod/tigron
52
55
echo "::group:: make install-dev-tools"
55
58
brew install yamllint shellcheck
56
59
fi
57
60
echo "::endgroup::"
58
- - name : " lint"
61
+ - if : ${{ env.GO_VERSION != '' }}
62
+ name : " lint"
59
63
env :
60
64
NO_COLOR : true
61
65
run : |
@@ -69,19 +73,22 @@ jobs:
69
73
export LINT_COMMIT_RANGE="$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})"
70
74
make lint
71
75
echo "::endgroup::"
72
- - name : " test-unit"
76
+ - if : ${{ env.GO_VERSION != '' }}
77
+ name : " test-unit"
73
78
run : |
74
79
echo "::group:: unit test"
75
80
cd mod/tigron
76
81
make test-unit
77
82
echo "::endgroup::"
78
- - name : " test-unit-race"
83
+ - if : ${{ env.GO_VERSION != '' }}
84
+ name : " test-unit-race"
79
85
run : |
80
86
echo "::group:: race test"
81
87
cd mod/tigron
82
88
make test-unit-race
83
89
echo "::endgroup::"
84
- - name : " test-unit-bench"
90
+ - if : ${{ env.GO_VERSION != '' }}
91
+ name : " test-unit-bench"
85
92
run : |
86
93
echo "::group:: bench"
87
94
cd mod/tigron
0 commit comments