mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat: add husky pre-commit hooks and reusable CI lint workflow
- Add husky with lint-staged for pre-commit checks (eslint --fix, prettier --write) - Add reusable lint.yml workflow (eslint, prettier, tsc) - Gate docker, release, and CI pipelines behind lint job via needs: lint
This commit is contained in:
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -1,3 +1,5 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, dev]
|
||||
@@ -5,7 +7,11 @@ on:
|
||||
branches: [main, dev]
|
||||
|
||||
jobs:
|
||||
lint-and-build:
|
||||
lint:
|
||||
uses: ./.github/workflows/lint.yml
|
||||
|
||||
build:
|
||||
needs: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -20,12 +26,6 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run ESLint
|
||||
run: npm run lint
|
||||
|
||||
- name: Run TypeScript check
|
||||
run: npx tsc --noEmit
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user