Skip to content

ci(.github): update Go integration and vet script #1601

ci(.github): update Go integration and vet script

ci(.github): update Go integration and vet script #1601

Workflow file for this run

# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Java
on: [push, pull_request, merge_group]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-24.04
# Presubmit jobs must complete within 5 minutes. See CONTRIBUTING.md.
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: "go.mod"
- name: Display Go version
run: go version
- uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: Display Java version
run: java -version
- name: Install Java tools
run: |
./.github/workflows/scripts/install_java_tools.sh "$HOME/java_tools"
echo "$HOME/java_tools/bin" >> $GITHUB_PATH
- name: Verify tools
run: |
protoc --version
google-java-format --version
# Verify plugins are executable (they don't support --version)
test -x "$(which protoc-gen-java_grpc)"
test -x "$(which protoc-gen-java_gapic)"
- name: Run internal/librarian/java tests and check coverage
run: go run ./tool/cmd/coverage ./internal/librarian/java