-
Notifications
You must be signed in to change notification settings - Fork 1
117 lines (109 loc) · 3.37 KB
/
test.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
112
113
114
115
116
117
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
-
name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
-
name: Install dependencies
run: npm ci
-
name: Run SASS linter
run: npm run sass:lint
-
name: Run JavaScript linter
run: npm run js:lint
-
name: Check EditorConfig configuration
run: test -f .editorconfig
-
name: Check adherence to EditorConfig
uses: greut/eclint-action@v0
with:
eclint_args: |
-exclude=css/*
-
name: Search for misspellings
uses: crate-ci/typos@master
-
name: Install Hunspell
run: sudo -- apt-get install -y hunspell gettext
-
name: Checkout dictionaries
uses: actions/checkout@v4
with:
repository: LibreOffice/dictionaries
path: libreoffice-dictionaries
-
name: Display misspellings in summary
run: |
{
echo '```'
git diff HEAD^ -- 'src/hu/' 'src/_data/*.json' ':!:*.png' \
| sed -e '/^diff --git/,/^@@ /d' \
| sed -ne 's#^+\(.\+\)#\1#p' \
| hunspell -d ./libreoffice-dictionaries/hu_HU/hu_HU -p hunspell.txt -l \
| sort -f \
| uniq -i
echo '```'
} >>"${GITHUB_STEP_SUMMARY}"
lint_links:
name: Lint Links
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Run Lychee
uses: lycheeverse/lychee-action@v1
with:
args: >-
--verbose
--no-progress
--require-https
--max-concurrency 2
--user-agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36'
'./**/*.md'
output: ${{ runner.temp }}/lychee/out.md
fail: true
lint_front_matter:
name: Lint Front Matter
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Cache pip
uses: actions/cache@v4
with:
path: '~/.cache/pip'
key: '${{ runner.os }}-pip-yamllint'
-
name: Install yamllint
run: pip install --user yamllint
-
name: Remove document contents
run: |
git ls-files -z -- 'src/**.md' | xargs -0 -n 1 -- sed -i -e 'N;P;/---\n$/Q;D'
-
name: Check Front Matter
run: |
git ls-files -z -- 'src/**.md' | xargs -0 -n 1 -- python -m yamllint