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/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

on:
pull_request:
branches:
- main
push:
branches:
- development

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-typecheck-build:
name: Lint, Typecheck & Build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.15.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Generate Prisma client
run: pnpm --filter web db:generate
env:
DATABASE_URL: postgresql://appuser:dummy@localhost:5432/virtualoffice

- name: Typecheck
run: pnpm typecheck

- name: Lint
run: pnpm lint

- name: Build
run: pnpm build
env:
# Dummy values — Next.js needs these to complete build
NEXTAUTH_URL: http://localhost:3000
NEXTAUTH_SECRET: dummy-secret-for-ci-build-only
GOOGLE_CLIENT_ID: dummy-client-id
GOOGLE_CLIENT_SECRET: dummy-client-secret
ALLOWED_WORKSPACE_DOMAIN: example.com
DATABASE_URL: postgresql://appuser:dummy@localhost:5432/virtualoffice
REDIS_URL: redis://localhost:6379
40 changes: 40 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: PR Title Check

on:
pull_request:
branches:
- main
types:
- opened
- edited
- synchronize
- reopened

jobs:
check-title:
name: Validate PR Title (Conventional Commits)
runs-on: ubuntu-latest

steps:
- name: Check PR title format
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Allowed types: feat, fix, chore, docs, style, refactor, perf, test, ci, build, revert
types: |
feat
fix
chore
docs
style
refactor
perf
test
ci
build
revert
requireScope: false
subjectPattern: ^.{1,100}$
subjectPatternError: |
PR title subject harus antara 1-100 karakter.
Loading