-
Notifications
You must be signed in to change notification settings - Fork 1
/
lefthook.yml
46 lines (46 loc) · 1.37 KB
/
lefthook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pre-commit:
parallel: true
commands:
standard:
tags: frontend lint
glob: "**/*.js"
run: dip yarn_no_tty standard {staged_files} --verbose | dip yarn snazzy # {staged_files} - list of files
standardrb:
tags: backend lint
glob: "{**/bin/*,**/.lefthook/**/*,**/Gemfile,**/*.{rb,erb},!(db/schema.rb)}"
run: dip bundle_no_tty exec standardrb {staged_files} | dip yarn snazzy
rspec:
tags: rspec spec backend
glob: "**/*spec.rb"
run: dip rspec_no_tty --fail-fast {staged_files}
pre-push:
parallel: true
commands:
rspec:
tags: rspec spec backend
run: dip crystalball_no_tty --fail-fast
package_audit:
tags: frontend secure
run: dip yarn_no_tty audit
gem_audit:
tags: backend secure
run: dip bundle_no_tty audit check --update
database_consistency:
tags: backend
run: dip database_consistency_no_tty
brakeman:
tags: backend
run: dip bundle_no_tty exec brakeman
post-checkout:
piped: true
scripts:
"01-bundle-checkinstall":
tags: backend
"02-yarn-checkinstall":
tags: fronend
"03-db-migrate":
tags: backend
runner: docker-compose -f docker-compose-dev.yml run --rm rails
"04-crystalball-update":
tags: rspec backend
runner: docker-compose -f docker-compose-dev.yml run --rm -e RAILS_ENV=test rails