From 9ae433aae9c5db51f610c629b57eafae0236ac15 Mon Sep 17 00:00:00 2001 From: othman hendy suseno Date: Sun, 14 Dec 2025 09:09:48 +0000 Subject: [PATCH] Update .gitea/workflows/ci.yml --- .gitea/workflows/ci.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c881e9d..d2c859f 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -2,18 +2,38 @@ name: CI on: push: - branches: [ "main", "develop" ] + branches: ["main", "develop"] pull_request: jobs: - build: + test-build: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version: "1.22" + cache: true + + - name: Go env + run: | + go version + go env + + - name: Vet + run: go vet ./... + - name: Test - run: go test ./... + run: go test ./... -race -count=1 + - name: Build run: go build ./cmd/... + + - name: Quick static checks (optional) + run: | + # gofmt check (fails if formatting differs) + test -z "$(gofmt -l . | head -n 1)"