chore(deps): update go to v1.26.5 #38
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
| name: CI | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| branches: | |
| - '**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0 | |
| - run: go test ./... -cover | |
| vet: | |
| name: Vet | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0 | |
| - run: go vet ./... | |
| goimports: | |
| name: goimports | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0 | |
| - name: Check formatting | |
| run: | | |
| output=$(goimports -l .) | |
| if [ -n "$output" ]; then | |
| echo "The following files are not formatted:" | |
| echo "$output" | |
| exit 1 | |
| fi | |
| lint: | |
| name: golangci-lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0 | |
| - run: golangci-lint run | |
| e2e: | |
| name: E2E | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0 | |
| - run: go test ./e2e/ -tags e2e -v | |
| go-version-sync: | |
| name: Go version sync | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Check Go versions match | |
| run: | | |
| dockerfile=$(sed -n 's/^FROM .*golang:\([0-9][0-9.]*\).*/\1/p' Dockerfile) | |
| gomod=$(sed -n 's/^go \([0-9][0-9.]*\)$/\1/p' go.mod) | |
| mise=$(sed -n 's/^go = "\([0-9][0-9.]*\)"$/\1/p' mise.toml) | |
| echo "Dockerfile: ${dockerfile:-<not found>}" | |
| echo "go.mod: ${gomod:-<not found>}" | |
| echo "mise.toml: ${mise:-<not found>}" | |
| if [ -z "$dockerfile" ] || [ -z "$gomod" ] || [ -z "$mise" ]; then | |
| echo "::error::Failed to extract a Go version from one or more files" | |
| exit 1 | |
| fi | |
| if [ "$dockerfile" != "$gomod" ] || [ "$gomod" != "$mise" ]; then | |
| echo "::error::Go versions are out of sync" | |
| exit 1 | |
| fi | |
| docker: | |
| name: Docker build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0 | |
| - uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0 | |
| - uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |