-
Notifications
You must be signed in to change notification settings - Fork 190
129 lines (124 loc) · 4.79 KB
/
ci-base-tests-linux.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: SMARTS CI Base Tests Linux
on: [push, pull_request]
env:
venv_dir: .venv
jobs:
base-tests:
runs-on: ubuntu-20.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal
strategy:
matrix:
tests:
- ./cli
- ./envision
- ./smarts/core --nb-exec-timeout 65536 --ignore=./smarts/core/tests/test_notebook.py
- ./smarts/env --ignore=./smarts/env/tests/test_rllib_hiway_env.py
- ./smarts/env/tests/test_rllib_hiway_env.py
- ./smarts/sstudio
- ./smarts/ray
- ./examples/tests/test_examples.py
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
python3.8 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install -e .[camera_obs,opendrive,test,test_notebook,torch,train,gif_recorder,gymnasium,argoverse,envision,sumo]
if echo ${{matrix.tests}} | grep -q -e "test_rllib_hiway_env.py"; then pip install -e .[rllib]; fi
if echo ${{matrix.tests}} | grep -q -e "test_examples.py"; then pip install -e .[examples,rllib]; fi
if echo ${{matrix.tests}} | grep -q -e "/smarts/ray"; then pip install -e .[ray]; fi
- name: Build scenarios
run: |
. ${{env.venv_dir}}/bin/activate
scl scenario build-all \
scenarios/open_drive/od_4lane \
scenarios/open_drive/od_merge \
scenarios/sumo/figure_eight \
scenarios/sumo/intersections/2lane \
scenarios/sumo/intersections/4lane \
scenarios/sumo/intersections/6lane \
scenarios/sumo/loop \
scenarios/sumo/straight/3lane_bubble \
scenarios/sumo/tests/multi_agents_loop \
scenarios/sumo/zoo_intersection
- name: Run smoke tests
run: |
. ${{env.venv_dir}}/bin/activate
PYTHONPATH=$PWD PYTHONHASHSEED=42 pytest -v \
--doctest-modules \
--forked \
--dist=no \
-n auto \
--ignore-glob="**/ros.py" \
--ignore-glob="**/waymo_map.py" \
--ignore-glob="**/argoverse_map.py" \
${{matrix.tests}} \
--ignore=./smarts/core/tests/test_smarts_memory_growth.py \
--ignore=./smarts/core/tests/test_env_frame_rate.py \
--ignore=./smarts/env/tests/test_benchmark.py \
-k 'not test_long_determinism'
examples-rl:
runs-on: ubuntu-20.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal
strategy:
matrix:
tests:
- e10_drive
- e11_platoon
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
cd ${GITHUB_WORKSPACE}/examples/${{matrix.tests}}
python3.8 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install -e ./../../.[camera_obs,argoverse,sumo,test]
pip install -e ./inference/
- name: Run smoke tests
run: |
cd ${GITHUB_WORKSPACE}/examples/${{matrix.tests}}
. ${{env.venv_dir}}/bin/activate
PYTHONPATH=$PWD PYTHONHASHSEED=42 pytest -v \
--doctest-modules \
--forked \
--dist=no \
-n auto \
${GITHUB_WORKSPACE}/examples/tests/test_rl.py::test_${{matrix.tests}}
benchmark:
runs-on: ubuntu-20.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal
strategy:
matrix:
tests:
- e10_drive
- e11_platoon
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
cd ${GITHUB_WORKSPACE}
python3.8 -m venv ${{env.venv_dir}}
. ${{env.venv_dir}}/bin/activate
pip install --upgrade pip
pip install wheel==0.38.4
pip install -e .[camera_obs,argoverse,test,ray,sumo]
scl zoo install examples/${{matrix.tests}}/inference
- name: Run smoke tests
run: |
cd ${GITHUB_WORKSPACE}
. ${{env.venv_dir}}/bin/activate
PYTHONPATH=$PWD PYTHONHASHSEED=42 SMARTS_RAY_NUM_CPUS=0 pytest -v \
--doctest-modules \
--forked \
--dist=no \
${GITHUB_WORKSPACE}/smarts/benchmark/tests/test_benchmark_runner.py::test_${{matrix.tests}}