From 314368134732c5361dd9f27b0b1b9487544cd589 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 10 May 2026 14:11:20 -0400 Subject: [PATCH 1/2] ci: add pre-test checks with format, lint, and compile steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename jobs: backend-ci → backend-pretest, frontend-ci → frontend-pretest - Backend: add Spotless format check, Checkstyle, and compile steps - Frontend: switch to pnpm, add typecheck, prettier, lint, and build steps - Trigger on push to any branch and PRs targeting main - Document trigger rules in workflow file --- .github/workflows/ci.yml | 43 +++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0f9300..15387a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,20 @@ name: CI run-name: Running continuous integration on ${{ github.actor }}'s commits +# Triggers: +# - push to ANY branch (catches feature branches, not tags) +# - pull requests targeting main +# Does NOT fire on tag-only pushes or unrelated events. on: push: branches: - - main + - "**" pull_request: + branches: + - main jobs: - backend-ci: + backend-pretest: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -20,14 +26,37 @@ jobs: distribution: "temurin" java-version: "25" - frontend-ci: - runs-on: ubuntu-latest + - name: Format check (Spotless) + run: ./mvnw spotless:check + + - name: Style check (Checkstyle) + run: ./mvnw checkstyle:check + + - name: Compile check + run: ./mvnw compile + frontend-pretest: + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v6 - - name: Set up node - uses: actions/setup-node@v6 + - name: Setup pnpm + uses: pnpm/action-setup@v6 with: - node-version: "24" + version: 10.24.0 + + - name: Install dependencies + run: cd js && pnpm install + + - name: Type check + run: cd js && pnpm run typecheck + + - name: Format check + run: cd js && pnpm run prettier + + - name: Lint + run: cd js && pnpm run lint + + - name: Compile check + run: cd js && pnpm run build From 87f64eb82cb39d1f7b3548eafb1b4e55b600d80c Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 15 May 2026 11:37:12 -0400 Subject: [PATCH 2/2] ci: use working-directory default instead of cd in frontend-pretest --- .github/workflows/ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15387a6..3b9588c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,9 @@ jobs: frontend-pretest: runs-on: ubuntu-latest + defaults: + run: + working-directory: js steps: - name: Checkout repository uses: actions/checkout@v6 @@ -47,16 +50,16 @@ jobs: version: 10.24.0 - name: Install dependencies - run: cd js && pnpm install + run: pnpm install - name: Type check - run: cd js && pnpm run typecheck + run: pnpm run typecheck - name: Format check - run: cd js && pnpm run prettier + run: pnpm run prettier - name: Lint - run: cd js && pnpm run lint + run: pnpm run lint - name: Compile check - run: cd js && pnpm run build + run: pnpm run build