From 0304c1d27f2010aee10ff313b431d37c6f201c57 Mon Sep 17 00:00:00 2001 From: hhs <386998068@qq.com> Date: Fri, 12 Jun 2026 23:39:42 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=B7=BB=E5=8A=A0=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E4=B8=8E=E5=90=8E=E7=AB=AF=20Gitea=20Actions=20=E6=8C=81?= =?UTF-8?q?=E7=BB=AD=E9=9B=86=E6=88=90=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflow/backend-ci.yml | 34 +++++++++++++++++++++++++++++++++ .gitea/workflow/frontend-ci.yml | 33 ++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .gitea/workflow/backend-ci.yml create mode 100644 .gitea/workflow/frontend-ci.yml diff --git a/.gitea/workflow/backend-ci.yml b/.gitea/workflow/backend-ci.yml new file mode 100644 index 0000000..62b021b --- /dev/null +++ b/.gitea/workflow/backend-ci.yml @@ -0,0 +1,34 @@ +name: Backend CI + +on: + push: + branches: [develop, main] + paths: [backend/**] + pull_request: + branches: [develop, main] + paths: [backend/**] + +jobs: + ci: + runs-on: ubuntu-latest + defaults: + run: + working-directory: backend + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: "1.23" + + - name: Download dependencies + run: go mod download + + - name: Vet + run: go vet ./... + + - name: Build + run: go build ./cmd/server + + - name: Test + run: go test ./... diff --git a/.gitea/workflow/frontend-ci.yml b/.gitea/workflow/frontend-ci.yml new file mode 100644 index 0000000..25cb51c --- /dev/null +++ b/.gitea/workflow/frontend-ci.yml @@ -0,0 +1,33 @@ +name: Frontend CI + +on: + push: + branches: [develop, main] + paths: [frontend/**] + pull_request: + branches: [develop, main] + paths: [frontend/**] + +jobs: + ci: + runs-on: ubuntu-latest + defaults: + run: + working-directory: frontend + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: frontend/package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + + - name: Type check & Build + run: npm run build -- 2.49.1