From 55b56ee172e32d4acab7b6186ec9e5cfb1a7a7ff Mon Sep 17 00:00:00 2001 From: Rogee Date: Thu, 20 Aug 2026 14:17:41 +0800 Subject: [PATCH] H-337: restore minimal GitHub Actions CI (#62) * ci(H-337): restore minimal GitHub Actions checks * ci(H-337): preserve workflow check identity --------- Co-authored-by: Rogee --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 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 00000000..b628a21c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: GoChat CI/CD Pipeline + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + backend: + name: Backend (SQLite) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: backend/go.mod + cache-dependency-path: backend/go.sum + - name: Test + working-directory: backend + env: + GOCHAT_TEST_DB: sqlite + run: go test ./internal/... ./pkg/... ./cmd/... + - name: Build + working-directory: backend + run: go build ./... + - name: Vet + working-directory: backend + run: go vet ./... + + frontend: + name: Frontend Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: corepack enable + - run: pnpm install --frozen-lockfile + - run: pnpm --dir frontend build