-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathtrunk.yaml
114 lines (103 loc) · 3.14 KB
/
trunk.yaml
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
112
113
114
version: 0.1
# version used for local trunk runs and testing
cli:
version: 1.22.10-beta.7
shell_hooks:
enforce: true
api:
address: api.trunk-staging.io:8443
org: trunk-staging-org
plugins:
sources:
- id: trunk
local: .
- id: configs
uri: https://github.com/trunk-io/configs
ref: v1.0.10
lint:
files:
- name: plugin.yaml
filenames: [plugin.yaml]
definitions:
- name: definition-checker
description: Checks plugin.yaml files for repo best practices
files: [plugin.yaml]
runtime: node
extra_packages:
- ts-node
- yaml
commands:
- name: check
run: ts-node ${workspace}/repo-tools/definition-checker/check.ts ${target}
batch: true
sandbox_type: expanded
output: regex
parse_regex: "((?P<path>.*) \\[(?P<severity>.*)\\]: (?P<message>.*) \\((?P<code>.*)\\))"
success_codes: [0]
enabled:
# enabled linters inherited from github.com/trunk-io/configs plugin
- definition-checker
disabled:
- pylint # pylint diagnostics are too strict
- semgrep
ignore:
- linters: [ALL]
paths:
- "**/test_data" # required for golangci-lint, which runs on directories
- "**/test_data/**"
- linters: [prettier]
paths: [linters/markdownlint/README.md]
threshold:
- linters: [trunk]
level: high
actions:
# Uncomment to enable more verbose action logs
# output_level: verbose
definitions:
- id: repo-tests
display_name: Repo Tests
description: Run tests on plugin configuration and documentation
runtime: node
packages_file: package.json
run: npm test tests/repo_tests
triggers:
- git_hooks: [pre-push]
- id: linter-test-helper
display_name: Linter Test Generator
description: Generate boilerplate test code when new linters are defined
runtime: python
packages_file: repo-tools/linter-test-helper/requirements.txt
run: python3 repo-tools/linter-test-helper/generate scan ${workspace}
triggers:
- files: [linters/**]
- id: tool-test-helper
display_name: Tool Test Generator
description: Generate boilerplate test code when new tools are defined
runtime: python
packages_file: repo-tools/tool-test-helper/requirements.txt
run: python3 repo-tools/tool-test-helper/generate scan ${workspace}
triggers:
- files: [tools/**]
- id: remove-release-snapshots
display_name: Remove Release Snapshots
description: Remove release tag from snapshots that were added to the release
run:
grep "// trunk-upgrade-validation:RELEASE" -r --include=*.shot -l | xargs -I {} sed -i -e
'/^\/\/ trunk-upgrade-validation:RELEASE/d' {}
shell: bash
enabled:
# enabled actions inherited from github.com/trunk-io/configs plugin
- linter-test-helper
- npm-check-pre-push
- remove-release-snapshots
- repo-tests
- tool-test-helper
tools:
enabled:
runtimes:
# expose shims in .trunk/tools
- node