18
18
jobs :
19
19
validate :
20
20
runs-on : ubuntu-latest
21
+ env :
22
+ SHCK_VERSION : " v0.7.1"
23
+ ECLINT_VERSION : " 0.3.2"
24
+ ECLINT_GITLAB_UPLOAD_TAG : " 38b6bd1c60e02d07b9c8b83ab115ce52"
21
25
22
26
steps :
23
27
- uses : actions/checkout@v2
24
28
25
- - name : Node Dependency Cache
26
- uses : actions/cache@v2
27
- with :
28
- path : node_modules
29
- key : ${{ runner.os }}-npm-${{ hashFiles('package.json') }}
30
- - name : Install Node dependencies
31
- run : npm install
32
- - name : Verify Prettier Style
33
- run : npx prettier . --check
34
- - name : Run MarkdownLint
35
- run : npx markdownlint .
36
- - name : Run EditorConfig Lint
37
- run : npx eclint check $(git ls-files | grep -f .eclintignore -v)
38
-
39
29
- name : Set up Python 3.8
40
30
uses : actions/setup-python@v1
41
31
with :
@@ -44,17 +34,33 @@ jobs:
44
34
uses : actions/cache@v2
45
35
with :
46
36
path : /opt/hostedtoolcache/Python/3.8.3/x64
47
- key : ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
37
+ key : ${{ runner.os }}-pip-${{ hashFiles('scripts/ requirements.txt') }}
48
38
- name : Install Python dependencies
49
39
run : |
50
40
python3 -m pip install --upgrade pip
51
- pip3 install -r requirements.txt
52
- - name : Projects Front Matter Validation
53
- run : ./scripts/test_project_frontmatter.py
54
- - name : Verify Black Style
55
- run : black . --check
41
+ pip3 install -r scripts/requirements.txt
56
42
57
43
- name : Install ShellCheck
58
- run : sudo apt install shellcheck
59
- - name : Run ShellCheck
60
- run : shellcheck scripts/*.sh
44
+ run : |
45
+ set -e;
46
+ mkdir -p /tmp/shck_install
47
+ cd /tmp/shck_install
48
+ wget "https://github.com/koalaman/shellcheck/releases/download/${SHCK_VERSION}/shellcheck-${SHCK_VERSION}.linux.x86_64.tar.xz"
49
+ tar --xz -xvf shellcheck-"${SHCK_VERSION}".linux.x86_64.tar.xz
50
+ sudo cp shellcheck-"${SHCK_VERSION}"/shellcheck /usr/bin/
51
+ shellcheck --version
52
+ rm -rf /tmp/shck_install
53
+
54
+ - name : Install ECLint
55
+ run : |
56
+ set -e
57
+ mkdir -p /tmp/eclint_install
58
+ cd /tmp/eclint_install
59
+ wget "https://gitlab.com/greut/eclint/uploads/${ECLINT_GITLAB_UPLOAD_TAG}/eclint_${ECLINT_VERSION}_linux_x86_64.tar.gz"
60
+ tar -xzvf eclint_"${ECLINT_VERSION}"_linux_x86_64.tar.gz
61
+ sudo cp eclint /usr/bin
62
+ eclint --version
63
+ rm -rf /tmp/eclint_install
64
+
65
+ - name : Run Linters
66
+ run : ./scripts/lint.sh
0 commit comments