From f2a4e00ea3545a49062dc3e155050901438596e8 Mon Sep 17 00:00:00 2001 From: RestartFU Date: Thu, 2 Oct 2025 22:31:02 -0400 Subject: [PATCH 1/2] ci: add GitHub Actions workflow to run Go tests --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1a8a2a3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: Go CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + + strategy: + matrix: + go-version: [1.25] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + + - name: Cache Go modules + uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Install dependencies + run: go mod download + + - name: Run tests + run: go test ./... -v From 83c4c42c019719f5ee03b7ff1f656961491e3a71 Mon Sep 17 00:00:00 2001 From: RestartFU Date: Thu, 2 Oct 2025 22:32:06 -0400 Subject: [PATCH 2/2] Update ci.yml --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a8a2a3..40220f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,11 @@ name: Go CI on: push: - branches: [main] + branches: + - "**" # runs on push to any branch pull_request: - branches: [main] + branches: + - "**" # runs on all PRs jobs: test: