From aed345bdc7b19e80af24f45f30add48439089702 Mon Sep 17 00:00:00 2001 From: Kevin Deng Date: Fri, 21 Aug 2026 15:15:07 +0900 Subject: [PATCH] Run data build in unit test workflow (#38) --- .github/workflows/deploy.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9003949..eda8e7a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,6 +46,11 @@ jobs: if: steps.fonts-cache.outputs.cache-hit != 'true' run: pnpm build:fonts + - name: Unit Test + id: unit_test + run: pnpm test + continue-on-error: ${{ github.event_name == 'pull_request' }} + - name: Generate site run: pnpm generate @@ -60,3 +65,7 @@ jobs: pages deploy .output/public --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }} --branch=${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || 'main' }} + + - name: Fail Workflow on Unit Test Failure + if: ${{ always() && github.event_name == 'pull_request' && steps.unit_test.outcome == 'failure' }} + run: exit 1 -- 2.51.2