From c2df7ef68b597381fe1664cc9785557260bba3e5 Mon Sep 17 00:00:00 2001 From: lzw-723 Date: Mon, 6 Apr 2026 13:40:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=89=8D=E7=AB=AF=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=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/workflows/web-ci.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .gitea/workflows/web-ci.yml diff --git a/.gitea/workflows/web-ci.yml b/.gitea/workflows/web-ci.yml new file mode 100644 index 0000000..06291cf --- /dev/null +++ b/.gitea/workflows/web-ci.yml @@ -0,0 +1,47 @@ +name: Web CI + +on: + push: + branches: [ master ] + paths: + - 'web/**' + - '.gitea/workflows/web-ci.yml' + pull_request: + branches: [ master ] + paths: + - 'web/**' + - '.gitea/workflows/web-ci.yml' + +jobs: + lint-test-build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./web + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'pnpm' + cache-dependency-path: web/pnpm-lock.yaml + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Install dependencies + run: pnpm install + + - name: Run lint + run: pnpm lint + + - name: Run tests + run: pnpm exec vitest run + + - name: Build + run: pnpm build