Prepare go version bump to 1.25 #866
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2026 SUSE LLC | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Build with oldest go | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
| with: | |
| fetch-tags: true | |
| fetch-depth: 0 | |
| - name: Setup Go ${{ matrix.go-version }} | |
| uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #v5.3.0 | |
| with: | |
| go-version: '1.19' | |
| - name: Hack the go version | |
| run: | | |
| # Hack the go.mod to check that it really builds on 1.19 | |
| sed -i 's/go [0-9.]\+/go 1.19/' go.mod | |
| - name: Install dependencies | |
| run: | | |
| go get ./... | |
| - name: Compute version | |
| run: | | |
| tag=$(git describe --tags --abbrev=0) | |
| version=$(git describe --tags --abbrev=0 | cut -f 3 -d '-') | |
| offset=$(git rev-list --count ${tag}..) | |
| echo "VERSION=$tag-$offset" >> "$GITHUB_ENV" | |
| - name: Build with oldest go | |
| run: | | |
| mkdir -p ./bin | |
| go build \ | |
| -tags nok8s \ | |
| -ldflags "-X github.com/uyuni-project/uyuni-tools/shared/utils.Version=${{ env.VERSION }}" \ | |
| -o ./bin \ | |
| ./... | |
| - name: Unit tests with all tags | |
| run: go test -tags nok8s ./... |