Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Setup Node.js
uses: actions/setup-node@v4.1.0
with:
node-version: '24.8.0'

- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
with:
version: 9.0.0

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
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

- name: Generate Prisma client
run: pnpm --filter @repo/db generate

- name: Build web app
run: pnpm --filter web build
env:
# CI-only placeholder values for build testing.
# These values are only used to satisfy build-time validation in CI and are not used for runtime operations or actual connections.
# They are not real credentials and are safe for public repositories.
DATABASE_URL: postgresql://user:password@localhost:5432/test
REDIS_HOST: localhost
REDIS_PORT: 6379
REDIS_PASSWORD: testpassword
BETTER_AUTH_SECRET: ci_test_secret_change_me
BETTER_AUTH_URL: http://localhost:3000
ENCRYPTION_SECRET: ci_encryption_secret_change_me
45 changes: 45 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Lint

on:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2

- name: Setup Node.js
uses: actions/setup-node@v4.1.0
with:
node-version: '24.8.0'

- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
with:
version: 9.0.0

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Setup pnpm cache
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-

Comment on lines +22 to +40
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This pnpm cache setup code is duplicated across both lint.yml and build.yml workflows. Consider extracting these steps into a reusable composite action or workflow to reduce duplication and ensure consistency across workflows.

Suggested change
- name: Install pnpm
uses: pnpm/action-setup@v4.0.0
with:
version: 9.0.0
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4.1.2
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup pnpm cache
uses: ./.github/actions/setup-pnpm-cache
with:
pnpm-version: 9.0.0

Copilot uses AI. Check for mistakes.
- name: Install dependencies
run: pnpm install

- name: Run lint
run: pnpm lint
Loading