Skip to content

Commit 8337102

Browse files
authoredMar 30, 2025··
Merge pull request #4047 from apostasie/ci-tigron-break-5
[CI] Tigron breakout 5: enable lint and tests on the CI
2 parents e47acc3 + 303faac commit 8337102

File tree

2 files changed

+92
-2
lines changed

2 files changed

+92
-2
lines changed
 

‎.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
jobs:
1515
go:
1616
timeout-minutes: 5
17-
name: "go | ${{ matrix.goos }} | ${{ matrix.canary }}"
17+
name: "${{ matrix.goos }} | ${{ matrix.canary }}"
1818
runs-on: "${{ matrix.os }}"
1919
defaults:
2020
run:
@@ -42,7 +42,7 @@ jobs:
4242
- name: Set GO env
4343
run: |
4444
# If canary is specified, get the latest available golang pre-release instead of the major version
45-
if [ "$canary" != "" ]; then
45+
if [ "${{ matrix.canary }}" != "" ]; then
4646
. ./hack/build-integration-canary.sh
4747
canary::golang::latest
4848
fi

‎.github/workflows/tigron.yml

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: tigron
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'release/**'
8+
pull_request:
9+
paths: 'mod/tigron/**'
10+
11+
env:
12+
GO_VERSION: 1.24.x
13+
GOTOOLCHAIN: local
14+
15+
jobs:
16+
lint:
17+
timeout-minutes: 10
18+
name: "${{ matrix.goos }} ${{ matrix.os }} | go ${{ matrix.canary }}"
19+
runs-on: ${{ matrix.os }}
20+
defaults:
21+
run:
22+
shell: bash
23+
strategy:
24+
matrix:
25+
include:
26+
- os: ubuntu-24.04
27+
- os: macos-15
28+
- os: windows-2022
29+
- os: ubuntu-24.04
30+
goos: freebsd
31+
- os: ubuntu-24.04
32+
canary: go-canary
33+
steps:
34+
- name: "Checkout project"
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
with:
37+
fetch-depth: 100
38+
- name: "Set GO env"
39+
run: |
40+
# If canary is specified, get the latest available golang pre-release instead of the major version
41+
if [ "${{ matrix.canary }}" != "" ]; then
42+
. ./hack/build-integration-canary.sh
43+
canary::golang::latest
44+
fi
45+
- name: "Install go"
46+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
47+
with:
48+
go-version: ${{ env.GO_VERSION }}
49+
check-latest: true
50+
- name: "Install tools"
51+
run: |
52+
cd mod/tigron
53+
echo "::group:: make install-dev-tools"
54+
make install-dev-tools
55+
if [ "$RUNNER_OS" == macOS ]; then
56+
brew install yamllint shellcheck
57+
fi
58+
echo "::endgroup::"
59+
- name: "lint"
60+
env:
61+
NO_COLOR: true
62+
run: |
63+
if [ "$RUNNER_OS" != "Linux" ] || [ "${{ matrix.goos }}" != "" ]; then
64+
echo "It is not necessary to run the linter on this platform (${{ env.RUNNER_OS }} ${{ matrix.goos }})"
65+
exit
66+
fi
67+
68+
echo "::group:: lint"
69+
cd mod/tigron
70+
export LINT_COMMIT_RANGE="$(jq -r '.after + "..HEAD"' ${GITHUB_EVENT_PATH})"
71+
make lint
72+
echo "::endgroup::"
73+
- name: "test-unit"
74+
run: |
75+
echo "::group:: unit test"
76+
cd mod/tigron
77+
make test-unit
78+
echo "::endgroup::"
79+
- name: "test-unit-race"
80+
run: |
81+
echo "::group:: race test"
82+
cd mod/tigron
83+
make test-unit-race
84+
echo "::endgroup::"
85+
- name: "test-unit-bench"
86+
run: |
87+
echo "::group:: bench"
88+
cd mod/tigron
89+
make test-unit-bench
90+
echo "::endgroup::"

0 commit comments

Comments
 (0)
Please sign in to comment.