-
Notifications
You must be signed in to change notification settings - Fork 13
54 lines (43 loc) · 1.35 KB
/
test_tutorials.yml
File metadata and controls
54 lines (43 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
44
45
46
47
48
49
50
51
52
53
54
name: Tutorial Tests
on:
push:
branches:
- main
paths:
- 'tutorials/**'
pull_request:
branches:
- main
paths:
- 'tutorials/**'
workflow_dispatch:
jobs:
test-tutorials:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install Jupyter and Kernel
run: |
python -m pip install --upgrade pip
python -m pip install jupyter pytest nbval
python -m pip install -r requirements.txt
- name: Install SUMO
run: |
sudo apt-get update
sudo apt-get install -y sumo sumo-tools sumo-doc
echo "SUMO_HOME=/usr/share/sumo" >> $GITHUB_ENV
echo "/usr/share/sumo/bin" >> $GITHUB_PATH
- name: Verify SUMO installation
run: |
echo "SUMO_HOME is set to $SUMO_HOME"
sumo --version
- name: Run tutorial tests
run: |
py.test --nbval-lax tutorials/1_Quickstart_TraffficEnvironment_Introduction --current-env
py.test --nbval-lax tutorials/2_MediumNetwork_AVsBehaviors_TorchRL_CollaborativeAlgorithms --current-env
py.test --nbval-lax tutorials/3_BiggerNetwork_IndependentAgents --current-env