Skip to content

Commit

Permalink
chore: add simple-git-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
edodusi committed Dec 23, 2024
1 parent 90ed49a commit 48ab55f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 22 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI

on: [push, pull_request]

env:
PNPM_CACHE_FOLDER: .pnpm-store
SKIP_INSTALL_SIMPLE_GIT_HOOKS: 1 # Skip installing simple-git-hooks

jobs:
commitlint:
runs-on: ubuntu-24.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run linters
on: [push]
env:
PNPM_CACHE_FOLDER: .pnpm-store
HUSKY: 0 # Bypass husky commit hook for CI
SKIP_INSTALL_SIMPLE_GIT_HOOKS: 1 # Skip installing simple-git-hooks
jobs:
lint:
name: Lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '!**'
env:
PNPM_CACHE_FOLDER: .pnpm-store
HUSKY: 0 # Bypass husky commit hook for CI
SKIP_INSTALL_SIMPLE_GIT_HOOKS: 1 # Skip installing simple-git-hooks
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches: [main, next, beta]

env:
PNPM_CACHE_FOLDER: .pnpm-store
SKIP_INSTALL_SIMPLE_GIT_HOOKS: 1 # Skip installing simple-git-hooks

jobs:
publish:
name: Publish to npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push]

env:
PNPM_CACHE_FOLDER: .pnpm-store
HUSKY: 0 # Bypass husky commit hook for CI
SKIP_INSTALL_SIMPLE_GIT_HOOKS: 1 # Skip installing simple-git-hooks

jobs:
test:
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"isomorphic-fetch": "^3.0.0",
"kolorist": "^1.8.0",
"prettier": "^3.4.2",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.7.2",
"vite": "^5.4.11",
"vite-plugin-banner": "^0.8.0",
Expand All @@ -100,5 +101,9 @@
"extends": [
"@commitlint/config-conventional"
]
},
"simple-git-hooks": {
"pre-commit": "pnpm lint",
"pre-push": "pnpm commitlint --last --verbose"
}
}
37 changes: 18 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48ab55f

Please sign in to comment.