mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-06-01 15:39:00 +00:00
ci: add Prettier format check GitHub Action
Adds a format-check workflow that runs `pnpm run format:check` (Lerna fans out to all packages with the script) on pushes to main/develop and all PRs. Also adds the missing `format:check` script to the server package so Lerna picks it up alongside the existing webapp script. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
65
.github/workflows/format-check.yml
vendored
Normal file
65
.github/workflows/format-check.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: Format Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
paths:
|
||||
- '**.ts'
|
||||
- '**.tsx'
|
||||
- '**.js'
|
||||
- '**.jsx'
|
||||
- '**.json'
|
||||
- '**.md'
|
||||
- '**/.prettierrc'
|
||||
- '**/prettier.config.*'
|
||||
- 'pnpm-lock.yaml'
|
||||
- 'package.json'
|
||||
- 'packages/*/package.json'
|
||||
- '.github/workflows/format-check.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.ts'
|
||||
- '**.tsx'
|
||||
- '**.js'
|
||||
- '**.jsx'
|
||||
- '**.json'
|
||||
- '**.md'
|
||||
- '**/.prettierrc'
|
||||
- '**/prettier.config.*'
|
||||
- 'pnpm-lock.yaml'
|
||||
- 'package.json'
|
||||
- 'packages/*/package.json'
|
||||
- '.github/workflows/format-check.yml'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: 'bash'
|
||||
|
||||
jobs:
|
||||
format-check:
|
||||
name: Prettier Format Check
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run format check
|
||||
run: pnpm run format:check
|
||||
Reference in New Issue
Block a user