From 051951dc4471c04dafda01e341ab73ce729bf144 Mon Sep 17 00:00:00 2001 From: GW_MC <72297530+GWMCwing@users.noreply.github.com> Date: Tue, 2 Dec 2025 19:48:25 +0800 Subject: [PATCH] Added frontend testing script and job --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ apps/frontend/package.json | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a8b5ce..638bb91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,6 +57,37 @@ jobs: - name: Run tests run: cargo test --all-features + test-frontend: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 10 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: 'pnpm' + cache-dependency-path: apps/frontend/pnpm-lock.yaml + + - name: Install frontend dependencies + run: | + cd apps/frontend + pnpm install + + - name: Run frontend tests + run: | + cd apps/frontend + pnpm test + lint: runs-on: ubuntu-latest steps: diff --git a/apps/frontend/package.json b/apps/frontend/package.json index 3f2873d..8d81f1d 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -6,7 +6,8 @@ "build": "react-router build", "dev": "react-router dev", "start": "react-router-serve ./build/server/index.js", - "typecheck": "react-router typegen && tsc" + "typecheck": "react-router typegen && tsc", + "test": "echo \"No tests specified\" && exit 0" }, "dependencies": { "@radix-ui/themes": "^3.2.1",