From badf703e869683f2e78032804cc034e7d42017f1 Mon Sep 17 00:00:00 2001 From: servervip-cmd Date: Mon, 12 Jan 2026 12:30:05 +0700 Subject: [PATCH 1/3] Add GitHub Actions workflow for Go project This workflow automates the build and test process for a Go project on push and pull request events to the main branch. --- .github/workflows/go.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..0b443f3 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,28 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... From 95fe2e270da08cd24af8f46e14d41f012cc5e684 Mon Sep 17 00:00:00 2001 From: servervip-cmd Date: Mon, 12 Jan 2026 12:41:28 +0700 Subject: [PATCH 2/3] Update go.yml --- .github/workflows/go.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0b443f3..1effb50 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,12 +14,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: - go-version: '1.20' + go-version: '1.22' - name: Build run: go build -v ./... From 416913888f6ae8083e78f18cfdec3ed398f5c46b Mon Sep 17 00:00:00 2001 From: servervip-cmd Date: Mon, 12 Jan 2026 12:45:37 +0700 Subject: [PATCH 3/3] Update Go version in workflow to 1.21 --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1effb50..d100013 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: '1.21' - name: Build run: go build -v ./...