From f431f5ed729a6b7c28e3bc32d430be03a27c277f Mon Sep 17 00:00:00 2001 From: shaw Date: Tue, 24 Feb 2026 11:37:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=81=A2=E5=A4=8Dbackend-ci.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/backend-ci.yml | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/backend-ci.yml diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml new file mode 100644 index 00000000..4fd22aff --- /dev/null +++ b/.github/workflows/backend-ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + pull_request: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: backend/go.mod + check-latest: false + cache: true + - name: Verify Go version + run: | + go version | grep -q 'go1.25.7' + - name: Unit tests + working-directory: backend + run: make test-unit + - name: Integration tests + working-directory: backend + run: make test-integration + + golangci-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: backend/go.mod + check-latest: false + cache: true + - name: Verify Go version + run: | + go version | grep -q 'go1.25.7' + - name: golangci-lint + uses: golangci/golangci-lint-action@v9 + with: + version: v2.7 + args: --timeout=5m + working-directory: backend \ No newline at end of file