ci: bump github.com/goreleaser/goreleaser
to v2.0.0
[backport: release/v0.52]
#10742
Workflow file for this run
This file contains 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
name: Test | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
- 'mkdocs.yml' | |
- 'LICENSE' | |
merge_group: | |
env: | |
GO_VERSION: '1.22' | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@v10 | |
with: | |
root-reserve-mb: 32768 # The golangci-lint uses a lot of space. | |
remove-android: "true" | |
remove-docker-images: "true" | |
remove-dotnet: "true" | |
remove-haskell: "true" | |
if: matrix.operating-system == 'ubuntu-latest' | |
- uses: actions/checkout@v4.1.6 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: go mod tidy | |
run: | | |
go mod tidy | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Run 'go mod tidy' and push it" | |
exit 1 | |
fi | |
if: matrix.operating-system == 'ubuntu-latest' | |
- name: Lint | |
id: lint | |
uses: golangci/golangci-lint-action@v6.0.1 | |
with: | |
version: v1.58 | |
args: --verbose --out-format=line-number | |
if: matrix.operating-system == 'ubuntu-latest' | |
- name: Check if linter failed | |
run: | | |
echo "Linter failed, running 'mage lint:fix' might help to correct some errors" | |
exit 1 | |
if: ${{ failure() && steps.lint.conclusion == 'failure' }} | |
- name: Install tools | |
uses: aquaproj/aqua-installer@v3.0.1 | |
with: | |
aqua_version: v1.25.0 | |
aqua_opts: "" | |
- name: Check if CLI references are up-to-date | |
run: | | |
mage docs:generate | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Run 'mage docs:generate' and push it" | |
exit 1 | |
fi | |
if: matrix.operating-system == 'ubuntu-latest' | |
- name: Run unit tests | |
run: mage test:unit | |
integration: | |
name: Integration Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4.1.6 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install tools | |
uses: aquaproj/aqua-installer@v3.0.1 | |
with: | |
aqua_version: v1.25.0 | |
- name: Run integration tests | |
run: mage test:integration | |
k8s-integration: | |
name: K8s Integration Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@v10 | |
with: | |
root-reserve-mb: 32768 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space. | |
remove-android: "true" | |
remove-docker-images: "true" | |
remove-dotnet: "true" | |
remove-haskell: "true" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4.1.6 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install tools | |
uses: aquaproj/aqua-installer@v3.0.1 | |
with: | |
aqua_version: v1.25.0 | |
- name: Run k8s integration tests | |
run: mage test:k8s | |
module-test: | |
name: Module Integration Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.6 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install tools | |
uses: aquaproj/aqua-installer@v3.0.1 | |
with: | |
aqua_version: v1.25.0 | |
- name: Run module integration tests | |
shell: bash | |
run: | | |
mage test:module | |
vm-test: | |
name: VM Integration Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@v10 | |
with: | |
root-reserve-mb: 32768 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space. | |
remove-android: 'true' | |
remove-docker-images: 'true' | |
remove-dotnet: 'true' | |
remove-haskell: 'true' | |
- name: Checkout | |
uses: actions/checkout@v4.1.6 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Install tools | |
uses: aquaproj/aqua-installer@v3.0.1 | |
with: | |
aqua_version: v1.25.0 | |
- name: Run vm integration tests | |
run: | | |
mage test:vm | |
build-test: | |
name: Build Test | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ubuntu-latest, windows-latest, macos-latest] | |
env: | |
DOCKER_CLI_EXPERIMENTAL: "enabled" | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@v10 | |
with: | |
root-reserve-mb: 32768 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space. | |
remove-android: 'true' | |
remove-docker-images: 'true' | |
remove-dotnet: 'true' | |
remove-haskell: 'true' | |
if: matrix.operating-system == 'ubuntu-latest' | |
- name: Checkout | |
uses: actions/checkout@v4.1.6 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Determine GoReleaser ID | |
id: goreleaser_id | |
shell: bash | |
run: | | |
if [ "${{ matrix.operating-system }}" == "windows-latest" ]; then | |
echo "id=--id build-windows" >> $GITHUB_OUTPUT | |
elif [ "${{ matrix.operating-system }}" == "macos-latest" ]; then | |
echo "id=--id build-macos --id build-bsd" >> $GITHUB_OUTPUT | |
else | |
echo "id=--id build-linux" >> $GITHUB_OUTPUT | |
fi | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: v2.0.0 | |
args: build --snapshot --clean --timeout 90m ${{ steps.goreleaser_id.outputs.id }} |