Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Go CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.16' # Replace with version from go.mod if found
Comment on lines +18 to +21
Copy link

Copilot AI May 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoding Go 1.16 may get out of sync with your module requirements. Consider sourcing the version directly from go.mod or defining it as a reusable input.

Suggested change
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.16' # Replace with version from go.mod if found
- name: Extract Go version from go.mod
id: go-version
run: echo "::set-output name=version::$(grep '^go ' go.mod | awk '{print $2}')"
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ steps.go-version.outputs.version }}

Copilot uses AI. Check for mistakes.

Comment on lines +21 to +22
Copy link

Copilot AI May 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a fixed Go version may lead to discrepancies if your project's go.mod specifies a different version; consider dynamically setting the version if possible.

Suggested change
go-version: '1.16' # Replace with version from go.mod if found
go-version: ${{ steps.get-go-version.outputs.go-version }}
- name: Get Go version from go.mod
id: get-go-version
run: echo "::set-output name=go-version::$(grep '^go ' go.mod | awk '{print $2}')"

Copilot uses AI. Check for mistakes.
- name: Run tests
run: go test ./...
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Empty file
Copy link

Copilot AI May 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file appears to be empty and may not be necessary; consider removing it if it is not intended for use.

Copilot uses AI. Check for mistakes.
Loading