improve SWIG generated modules that use threading #255
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pylint-Docker | |
on: | |
push: | |
paths: | |
- 'src/**' | |
- 'modules/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: enstoredev/enstore-dev:latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: run unittests with pytest | |
run: | | |
source /data/setup-enstore | |
cd /__w/enstore/enstore | |
export PYTHONPATH=`pwd`:`pwd`/src:`pwd`/HTMLgen:`pwd`/PyGreSQL:$PYTHONPATH | |
coverage run -m pytest src/tests || printf "some unit test exited code $?\n\n" | |
coverage report --omit 'HTMgen/*','DBUtils/*','config-file*','/opt/*','src/tests/*','*/__init__.py' | |
coverage html --omit 'HTMgen/*','DBUtils/*','config-file*','/opt/*','src/tests/*','*/__init__.py' | |
tar cvzf htmlcov.tar htmlcov | |
- name: Archive coverage report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: code-coverage-report | |
path: htmlcov.tar | |
- name: analysing with pylint | |
run: | | |
source /data/setup-enstore | |
find . -name '*.py' > python_files | |
export num_files=$(wc -l python_files) | |
export opts=' --disable=all --enable=syntax-error' | |
export opts=$opts' --enable=bad-thread-instantiation' | |
export opts=$opts' --enable=used-before-assignment' | |
export opts=$opts' --enable=undefined-variable --score no' | |
echo "found $num_files " | |
for P in $(cat python_files) ; do python -m pylint $opts $P 2>/dev/null || printf "pylint $P exited code $?\n\n" ; done | |
echo "linted $num_files " |