Skip to content

Fix Docker build failure: downgrade Go version from 1.24 to 1.23.4 #790

Fix Docker build failure: downgrade Go version from 1.24 to 1.23.4

Fix Docker build failure: downgrade Go version from 1.24 to 1.23.4 #790

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
env:
GO_VERSION: 1.24.0
jobs:
test:
name: Test
runs-on: namespace-profile-linux-4vcpu-8gb-cached
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
## skip cache, use Namespace volume cache
cache: false
- name: Init Dummy Git config for testing
run: |
git config --global user.email "github-action@mail.com"
git config --global user.name "github-action"
- name: Setup Namespace cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: go
- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest
- name: Generate Protobuf files
working-directory: internal/app/world-cli
run: task buf:generate
- name: Run unit tests with coverage
working-directory: internal/app/world-cli
run: task test:coverage
- name: Upload coverage to Codecov
if: github.ref == 'refs/heads/main' || github.event_name == 'pull_request'
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: "./"
lint-go:
name: Lint (go)
runs-on: namespace-profile-linux-4vcpu-8gb-cached
env:
GO_VERSION: 1.24.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
## skip cache, use Namespace volume cache
cache: false
- name: Setup Namespace cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: go
path: |
/home/runner/go/pkg
/home/runner/.cache/go-build
/home/runner/.cache/golangci-lint
- name: Find go path
run: echo "path=$(go list -f '{{.Dir}}/...' -m | xargs)" >> $GITHUB_OUTPUT
## Equivalent to 'make lint' arguments
- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest
- name: Generate Protobuf files
working-directory: internal/app/world-cli
run: task buf:generate
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
working-directory: internal/app/world-cli
version: latest
args: --timeout=10m -v ${{ steps.go-dir.outputs.path }}
## skip cache, use Namespace volume cache
skip-cache: true
lint-md:
name: Lint (markdown)
runs-on: ubuntu-latest
if: ${{ github.event_name != 'push' || contains(github.event.head_commit.modified, '**.md') || contains(github.event.head_commit.added, '**.md') }}
steps:
- name: Checkout
uses: actions/checkout@v4
## detect errors from markdownlint-cli and create annotations for them
- uses: xt0rted/markdownlint-problem-matcher@v3
- uses: articulate/actions-markdownlint@v1
with:
config: internal/app/world-cli/.markdownlint.yaml
ignore: vendor
version: 0.39.0
build:
name: Go
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Task
run: |
go install github.com/go-task/task/v3/cmd/task@latest
- name: Generate Protobuf files
working-directory: internal/app/world-cli
run: task buf:generate
- name: Build
working-directory: internal/app/world-cli
run: task build