Skip to content

Commit 0a80b64

Browse files
vdiezclaude
andcommitted
fix: CI setup for tsgolint Go build
- Linux build: checkout with submodules so tsgolint is available - Add Go 1.26 via mise (separate step, doesn't pollute shared anchor) - Install protoc v28.3 from GitHub releases - Install protoc-gen-go and protoc-gen-go-grpc in CI and POM - POM go install steps ensure local builds also work Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3d566e2 commit 0a80b64

File tree

2 files changed

+52
-2
lines changed

2 files changed

+52
-2
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ jobs:
142142
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
143143
permissions: *read_permissions
144144
steps:
145-
- *checkout
145+
- name: Checkout source code with submodules
146+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
147+
with:
148+
submodules: true
146149
- &mise
147150
uses: jdx/mise-action@v3.6.1
148151
with:
@@ -153,6 +156,22 @@ jobs:
153156
java = "21.0"
154157
maven = "3.9"
155158
node = "24.11.0"
159+
- name: Setup Go and proto tools for tsgolint
160+
uses: jdx/mise-action@v3.6.1
161+
with:
162+
version: 2025.11.2
163+
mise_toml: |
164+
[tools]
165+
go = "1.26"
166+
- name: Install protoc and Go proto generators
167+
env:
168+
PROTOC_VERSION: "28.3"
169+
run: |
170+
curl -sSLo /tmp/protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip"
171+
sudo unzip -o /tmp/protoc.zip -d /usr/local bin/protoc
172+
sudo chmod +x /usr/local/bin/protoc
173+
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
174+
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
156175
- &npm_cache
157176
name: Cache NPM dependencies
158177
uses: SonarSource/gh-action_cache@v1

sonar-plugin/sonar-javascript-plugin/pom.xml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
</configuration>
201201
</execution>
202202

203-
<!-- tsgolint: init submodule -->
203+
<!-- tsgolint: ensure submodule is initialized (no-op if already done by checkout) -->
204204
<execution>
205205
<id>tsgolint-submodule-init</id>
206206
<phase>initialize</phase>
@@ -232,6 +232,37 @@
232232
</arguments>
233233
</configuration>
234234
</execution>
235+
<!-- tsgolint: install Go proto generators (idempotent) -->
236+
<execution>
237+
<id>tsgolint-install-proto-gen</id>
238+
<phase>generate-resources</phase>
239+
<goals><goal>exec</goal></goals>
240+
<configuration>
241+
<executable>go</executable>
242+
<environmentVariables>
243+
<GOWORK>off</GOWORK>
244+
</environmentVariables>
245+
<arguments>
246+
<argument>install</argument>
247+
<argument>google.golang.org/protobuf/cmd/protoc-gen-go@latest</argument>
248+
</arguments>
249+
</configuration>
250+
</execution>
251+
<execution>
252+
<id>tsgolint-install-proto-gen-grpc</id>
253+
<phase>generate-resources</phase>
254+
<goals><goal>exec</goal></goals>
255+
<configuration>
256+
<executable>go</executable>
257+
<environmentVariables>
258+
<GOWORK>off</GOWORK>
259+
</environmentVariables>
260+
<arguments>
261+
<argument>install</argument>
262+
<argument>google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest</argument>
263+
</arguments>
264+
</configuration>
265+
</execution>
235266
<!-- tsgolint: generate Go proto stubs -->
236267
<execution>
237268
<id>tsgolint-proto-gen-go</id>

0 commit comments

Comments
 (0)