forked from danmar/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.51 KB
/
scriptcheck.yml
File metadata and controls
51 lines (40 loc) · 1.51 KB
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
# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
name: scriptcheck
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install missing software on ubuntu
run: |
sudo apt-get update
sudo apt-get install shellcheck
sudo apt-get install python3-setuptools
sudo pip3 install natsort
sudo pip3 install pexpect
sudo pip3 install pylint
sudo pip3 install unittest2
sudo pip install pytest
sudo pip3 install pytest
- name: run Shellcheck
run: |
find . -name "*.sh" | xargs shellcheck || true
- name: run pylint
run: |
pylint --rcfile=pylintrc_travis htmlreport/cppcheck-htmlreport
pylint --rcfile=pylintrc_travis htmlreport/*.py
pylint --rcfile=pylintrc_travis tools/*.py
- name: compile addons
run: |
python -m compileall ./addons
python3 -m compileall ./addons
- name: check .json files
run: |
find . -name '*.json' | xargs -n 1 python3 -m json.tool > /dev/null
- name: test addons
run: |
make -s
PYTHONPATH=./addons python -m pytest addons/test/test-*.py
PYTHONPATH=./addons python3 -m pytest addons/test/test-*.py