-
Notifications
You must be signed in to change notification settings - Fork 276
/
lefthook.yml
111 lines (110 loc) · 3.63 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
pre-push:
commands:
packages-audit:
tags: frontend security
run: yarn audit
pre-commit:
parallel: true
commands:
lint-markdown:
tags: lint
glob: "content/**/*.md"
run: |
docker compose run --rm --name remark-lint remark-lint '{staged_files}'
cloud-lint:
tags: lint,v2
glob: "content/influxdb/cloud/**/*.md"
run: '.ci/vale/vale.sh
--config=.vale.ini
--minAlertLevel=error {staged_files}'
cloud-dedicated-lint:
tags: lint,v3
glob: "content/influxdb/cloud-dedicated/**/*.md"
run: '.ci/vale/vale.sh
--config=content/influxdb/cloud-dedicated/.vale.ini
--minAlertLevel=error {staged_files}'
cloud-serverless-lint:
tags: lint,v3
glob: "content/influxdb/cloud-serverless/**/*.md"
run: '.ci/vale/vale.sh
--config=content/influxdb/cloud-serverless/.vale.ini
--minAlertLevel=error {staged_files}'
clustered-lint:
tags: lint,v3
glob: "content/influxdb/clustered/**/*.md"
run: '.ci/vale/vale.sh
--config=content/influxdb/cloud-serverless/.vale.ini
--minAlertLevel=error {staged_files}'
telegraf-lint:
tags: lint,clients
glob: "content/telegraf/**/*.md"
run: '.ci/vale/vale.sh
--config=.vale.ini
--minAlertLevel=error {staged_files}'
v2-lint:
tags: lint,v2
glob: "content/influxdb/v2/**/*.md"
run: '.ci/vale/vale.sh
--config=content/influxdb/v2/.vale.ini
--minAlertLevel=error {staged_files}'
cloud-pytest:
glob: content/influxdb/cloud/**/*.md
tags: test,codeblocks,v2
env:
- SERVICE: cloud-pytest
run: docker compose run --rm --name $SERVICE $SERVICE '{staged_files}'
cloud-dedicated-pytest:
tags: test,codeblocks,v3
glob: content/influxdb/cloud-dedicated/**/*.md
env:
- SERVICE: cloud-dedicated-pytest
run: |
./test/scripts/monitor-tests.sh start $SERVICE ;
docker compose run --name $SERVICE $SERVICE {staged_files} ;
./test/scripts/monitor-tests.sh stop $SERVICE
cloud-serverless-pytest:
tags: test,codeblocks,v3
glob: content/influxdb/cloud-serverless/**/*.md
env:
- SERVICE: cloud-serverless-pytest
run: docker compose run --rm --name $SERVICE $SERVICE '{staged_files}'
clustered-pytest:
tags: test,codeblocks,v3
glob: content/influxdb/clustered/**/*.md
env:
- SERVICE: clustered-pytest
run: |
./test/scripts/monitor-tests.sh start $SERVICE ;
docker compose run --name $SERVICE $SERVICE {staged_files} ;
./test/scripts/monitor-tests.sh stop $SERVICE
telegraf-pytest:
tags: test,codeblocks
glob: content/telegraf/**/*.md
env:
- SERVICE: telegraf-pytest
run: docker compose run --rm --name $SERVICE $SERVICE '{staged_files}'
v2-pytest:
tags: test,codeblocks,v2
glob: content/influxdb/v2/**/*.md
env:
- SERVICE: v2-pytest
run: docker compose run --rm --name $SERVICE $SERVICE '{staged_files}'
prettier:
tags: frontend,style
glob: "*.{css,js,ts,jsx,tsx}"
run: yarn prettier {staged_files}
build:
commands:
prune-legacy-containers:
priority: 1
tags: test
run: '(docker container ls --format "{{.ID}}"
--filter label=tag=influxdata-docs
--filter status=exited | xargs docker rm)
|| true'
rebuild-test-images:
tags: test
run: docker compose build pytest-codeblocks