-
Notifications
You must be signed in to change notification settings - Fork 1.2k
38 lines (34 loc) · 1.22 KB
/
check-text.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
name: Linter
on:
pull_request:
jobs:
text-linter:
name: TEXT linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Make sure that we only install the dependencies for textlint to speed up install
- run: |
mkdir -p tmp
jq '.devDependencies |= with_entries( select(.key | startswith("textlint")))
| del(.dependencies, .optionalDependencies)' \
package.json > tmp/package-min.json
cp tmp/package-min.json package.json
- run: npm install --ignore-scripts --omit=optional
- run: .github/workflows/scripts/textlint.sh
markdown-linter:
name: MARKDOWN linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create and use reduced-dependencies package.json
run: |
mkdir -p tmp
jq '.devDependencies |= with_entries(
select(.key | test("gulp|markdown|through|require|yargs"))
)
| del(.dependencies, .optionalDependencies)' \
package.json > tmp/package-min.json
cp tmp/package-min.json package.json
- run: npm install --ignore-scripts --omit=optional
- run: npm run check:markdown