File tree Expand file tree Collapse file tree 8 files changed +1676
-0
lines changed Expand file tree Collapse file tree 8 files changed +1676
-0
lines changed Original file line number Diff line number Diff line change 3
3
"^\\.git[/\\\\]",
4
4
"__pycache__[/\\\\]",
5
5
"^LICENSE\\.txt$",
6
+ "node_modules[/\\\\]",
6
7
"^poetry\\.lock$",
7
8
"^\\.licenses[/\\\\]",
8
9
"^internal/rule/schema/schemadata/bindata.go$",
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ name: Check Markdown
4
4
env :
5
5
# See: https://github.com/actions/setup-go/tree/main#supported-version-syntax
6
6
GO_VERSION : " 1.17"
7
+ # See: https://github.com/actions/setup-node/#readme
8
+ NODE_VERSION : 16.x
7
9
8
10
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
9
11
on :
12
14
paths :
13
15
- " .github/workflows/check-markdown-task.ya?ml"
14
16
- " .markdown-link-check.json"
17
+ - " package.json"
18
+ - " package-lock.json"
15
19
- " Taskfile.ya?ml"
16
20
- " **/.markdownlint*"
17
21
- " **.mdx?"
22
26
paths :
23
27
- " .github/workflows/check-markdown-task.ya?ml"
24
28
- " .markdown-link-check.json"
29
+ - " package.json"
30
+ - " package-lock.json"
25
31
- " Taskfile.ya?ml"
26
32
- " **/.markdownlint*"
27
33
- " **.mdx?"
70
76
- name : Checkout repository
71
77
uses : actions/checkout@v4
72
78
79
+ - name : Setup Node.js
80
+ uses : actions/setup-node@v4
81
+ with :
82
+ node-version : ${{ env.NODE_VERSION }}
83
+
73
84
- name : Initialize markdownlint-cli problem matcher
74
85
uses : xt0rted/markdownlint-problem-matcher@v3
75
86
@@ -98,6 +109,11 @@ jobs:
98
109
with :
99
110
go-version : ${{ env.GO_VERSION }}
100
111
112
+ - name : Setup Node.js
113
+ uses : actions/setup-node@v4
114
+ with :
115
+ node-version : ${{ env.NODE_VERSION }}
116
+
101
117
- name : Install Task
102
118
uses : arduino/setup-task@v2
103
119
with :
Original file line number Diff line number Diff line change 3
3
arduino-lint.exe
4
4
__pycache__ /
5
5
6
+ # Generated files
7
+ node_modules /
8
+
6
9
# Test artifacts
7
10
coverage_unit.txt
8
11
Original file line number Diff line number Diff line change 1
1
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown/.markdownlintignore
2
2
.licenses /
3
3
__pycache__ /
4
+ node_modules /
Original file line number Diff line number Diff line change 7
7
# Generated files
8
8
/.licenses /
9
9
__pycache__ /
10
+ node_modules /
10
11
11
12
# Test files
12
13
/internal /rule /schema /testdata /input /invalid-schema.json
Original file line number Diff line number Diff line change @@ -320,6 +320,7 @@ tasks:
320
320
desc : Check for broken links
321
321
deps :
322
322
- task : docs:generate
323
+ - task : npm:install-deps
323
324
cmds :
324
325
- |
325
326
if [[ "{{.OS}}" == "Windows_NT" ]]; then
@@ -361,15 +362,29 @@ tasks:
361
362
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml
362
363
markdown:fix :
363
364
desc : Automatically correct linting violations in Markdown files where possible
365
+ deps :
366
+ - task : npm:install-deps
364
367
cmds :
365
368
- npx markdownlint-cli --fix "**/*.md"
366
369
367
370
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-markdown-task/Taskfile.yml
368
371
markdown:lint :
369
372
desc : Check for problems in Markdown files
373
+ deps :
374
+ - task : npm:install-deps
370
375
cmds :
371
376
- npx markdownlint-cli "**/*.md"
372
377
378
+ # Parameter variables:
379
+ # - PROJECT_PATH: path of the npm-managed project. Default value: "./"
380
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/npm-task/Taskfile.yml
381
+ npm:install-deps :
382
+ desc : Install dependencies managed by npm
383
+ dir : |
384
+ "{{default "./" .PROJECT_PATH}}"
385
+ cmds :
386
+ - npm install
387
+
373
388
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
374
389
poetry:install-deps :
375
390
desc : Install dependencies managed by Poetry
You can’t perform that action at this time.
0 commit comments