From 0327f734637c44362ac4221c46d0290d277c8586 Mon Sep 17 00:00:00 2001 From: Violetlove200100 Date: Mon, 20 Jul 2026 12:53:26 +0000 Subject: [PATCH] ci: add GitHub Actions workflow for lint, typecheck, and build Adds .github/workflows/ci.yml that runs on every PR to main and on pushes to main. Steps: - Install pnpm 11.9.0 with store caching - pnpm install --frozen-lockfile - prisma:generate (required for access-api build) - pnpm run lint - pnpm run typecheck - pnpm run build closes #41 --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..01f804f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: CI + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + ci: + name: Lint, Typecheck & Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: "11.9.0" + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - name: Cache pnpm store + uses: actions/cache@v4 + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Generate Prisma client + run: pnpm --filter access-api run prisma:generate + + - name: Lint + run: pnpm run lint + + - name: Typecheck + run: pnpm run typecheck + + - name: Build + run: pnpm run build