2020-07-30 10:37:14 +02:00
|
|
|
# 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:
|
|
|
|
|
2020-12-15 10:59:09 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2020-07-30 10:37:14 +02:00
|
|
|
|
|
|
|
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
|
2020-11-24 07:48:13 +01:00
|
|
|
sudo pip install pytest
|
|
|
|
sudo pip3 install pytest
|
2020-07-30 10:37:14 +02:00
|
|
|
|
|
|
|
- name: run Shellcheck
|
|
|
|
run: |
|
2021-01-20 18:43:49 +01:00
|
|
|
find . -name "*.sh" | xargs shellcheck --exclude SC2002,SC2013,SC2034,SC2035,SC2043,SC2046,SC2086,SC2089,SC2090,SC2129,SC2211,SC2231
|
2020-07-30 10:37:14 +02:00
|
|
|
|
|
|
|
- name: run pylint
|
|
|
|
run: |
|
|
|
|
pylint --rcfile=pylintrc_travis htmlreport/cppcheck-htmlreport
|
|
|
|
pylint --rcfile=pylintrc_travis htmlreport/*.py
|
|
|
|
pylint --rcfile=pylintrc_travis tools/*.py
|
|
|
|
|
2020-09-05 18:29:19 +02:00
|
|
|
- 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
|
2020-11-24 07:48:13 +01:00
|
|
|
|
|
|
|
- name: test addons
|
|
|
|
run: |
|
|
|
|
make -s
|
|
|
|
PYTHONPATH=./addons python -m pytest addons/test/test-*.py
|
|
|
|
PYTHONPATH=./addons python3 -m pytest addons/test/test-*.py
|
|
|
|
|