-
Notifications
You must be signed in to change notification settings - Fork 38
/
trunk.yaml
104 lines (94 loc) · 2.58 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
version: 0.1
cli:
# version used for local trunk runs and testing
version: 1.7.0
plugins:
sources:
- id: trunk
local: .
runtimes:
enabled:
- go@1.19.5
- node@18.12.1
- python@3.10.8
lint:
downloads:
- name: trunk-toolbox
# Our own internal alpha linter
downloads:
- os:
linux: unknown-linux-gnu
macos: apple-darwin
cpu:
x86_64: x86_64
arm_64: aarch64
url: https://github.com/trunk-io/toolbox/releases/download/${version}/trunk-toolbox-${version}-${cpu}-${os}.tar.gz
definitions:
- name: trunk-toolbox
download: trunk-toolbox
files: [ALL]
commands:
- output: sarif
run: trunk-toolbox --upstream ${upstream-ref}
success_codes: [0]
read_output_from: stdout
disable_upstream: true
target: .
environment:
- name: PATH
list: ["${linter}"]
enabled:
- actionlint@1.6.23
- black@23.1.0
- eslint@8.36.0
- git-diff-check
- gitleaks@8.16.1
- isort@5.12.0
- markdownlint@0.33.0
- prettier@2.8.4
- renovate@35.8.3
- ruff@0.0.256
- shellcheck@0.9.0
- shfmt@3.5.0
- taplo@0.7.0
- trunk-toolbox@0.0.0-sam.18
- yamllint@1.29.0
ignore:
- linters: [ALL]
paths:
- "**/test_data" # required for golangci-lint, which runs on directories
- "**/test_data/**"
actions:
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: Test Generator
description: Generate boilerplate test code when new linters are defined
runtime: python
packages_file: tools/linter-test-helper/requirements.txt
run: tools/linter-test-helper/generate scan ${workspace}
triggers:
- files: [linters/**]
- 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:
- remove-release-snapshots
- repo-tests
- linter-test-helper
- trunk-announce
- trunk-cache-prune
- trunk-upgrade-available
- trunk-check-pre-push
- trunk-fmt-pre-commit