-
Notifications
You must be signed in to change notification settings - Fork 64
60 lines (58 loc) · 1.96 KB
/
run-ci.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
name: CI
run-name: Check ${{ github.ref_name }} by @${{ github.actor }}
on: pull_request
jobs:
linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "*"
- name: Prepare Linters
run: npm install -g eslint stylelint stylelint-config-standard
- name: Run ESLint (*.js)
run: >
git diff --name-only --diff-filter=ACMTUXB origin/${{ github.base_ref }} HEAD |
grep -E "\.js$" |
xargs -r eslint
- name: Run stylelint (*.css)
if: success() || failure()
run: >
git diff --name-only --diff-filter=ACMTUXB origin/${{ github.base_ref }} HEAD |
grep -E "\.css$" |
xargs -r stylelint
- name: Run ShellCheck (*.sh)
if: success() || failure()
run: >
git diff --name-only --diff-filter=ACMTUXB origin/${{ github.base_ref }} HEAD |
grep -E "\.sh$" |
xargs -r shellcheck
spellcheck:
name: Run spell check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "*"
- run: pip install codespell
# The case sensitivity of codespeller for ignore-words seems to be buggy. See
# issue tracker. According to the help page it should be case sensitive but
# only 'allws' makes codespeller ignore 'allWs' in code files.
- name: Run codespell
run: >
git diff --name-only --diff-filter=ACMTUXB origin/${{ github.base_ref }} HEAD |
xargs -r codespell -q 3 --skip="*.po*,*.git/*" --ignore-words .github/ignore-words.txt
build:
name: Run build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get update -q && sudo apt-get install gettext
- run: bash scripts/build.sh