Skip to content

Update project to go 1.25.5 #37

Update project to go 1.25.5

Update project to go 1.25.5 #37

Workflow file for this run

#
# Copyright (c) 2019-2025 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
name: Validate PRs
on:
pull_request:
branches: [ main ]
jobs:
go:
name: Check sources
runs-on: ubuntu-24.04
steps:
-
name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: '1.25.5'
-
name: Check out code into the Go module directory
uses: actions/checkout@v4
-
name: Cache go modules
id: cache-mod
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
-
name: Download dependencies
run: go mod download
if: steps.cache-mod.outputs.cache-hit != 'true'
-
name: Check go mod status
run: |
go mod tidy
if [[ ! -z $(git status -s) ]]
then
echo "Go mod state is not clean:"
git --no-pager diff
exit 1
fi
-
name: Check format
run: |
go install github.com/google/addlicense@latest
go install golang.org/x/tools/cmd/goimports@latest
make check_fmt
if [[ $? != 0 ]]
then
echo "not well formatted sources are found:"
git --no-pager diff
exit 1
fi
-
name: Check go vet
run: |
go vet ./...
-
name: Run Go Tests
run: |
go test ./...
docker:
name: Check docker build
runs-on: ubuntu-latest
steps:
-
name: Check out code into the Go module directory
uses: actions/checkout@v4
-
name: Check if dockerimage build is working
run: docker build -f ./build/Dockerfile .