-
Notifications
You must be signed in to change notification settings - Fork 21
43 lines (40 loc) · 1.35 KB
/
python_test.yml
File metadata and controls
43 lines (40 loc) · 1.35 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
name: Python application test
on: [push]
jobs:
build:
runs-on: ubuntu-18.04
container:
image: horizonrobotics/alf:0.0.3-pytorch
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
git submodule update --init --recursive
mkdir build
cd build
cmake ..
make -j
cd ..
# remove the SocialRobot installation in the docker image as it's not up-to-date
rm -rf /opt/local/SocialRobot
pip3 install -e .
- name: Static python syntax checking
run: |
pip3 install flake8
# static python syntax checking
flake8 ./python --count --select=E9,F63,F7,F82 --show-source --statistics
# report warnings, ignore E501 line too long
flake8 ./python --count --exit-zero --max-complexity=12 --ignore=E501 --statistics
- name: Check code style
run: |
pre-commit install
clang-format --version
if ! pre-commit run -a ; then
git diff
exit 1
fi
- name: Test with pytest
run: |
cd ./python/social_bot/envs
# not clear why social_bot cannot be found. So we have to add it to PYTHONPATH
PYTHONPATH="$(pwd)/../..:/usr/lib/python3.6/site-packages:$PYTHONPATH" GAZEBO_MODEL_PATH=../models xvfb-run python3 -m unittest discover -p "*_test.py" -v