-
Notifications
You must be signed in to change notification settings - Fork 144
79 lines (69 loc) · 2.28 KB
/
spot_ros_unit_tests.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
name: spot_driver unit tests
# Run on every push
on: [push]
# Environmental variables
env:
SPOT_ARM: 1
jobs:
spot_driver-unit-tests:
# All steps inside this job will run inside the ROS Noetic container
container: public.ecr.aws/docker/library/ros:noetic
runs-on: ubuntu-latest
# Let's ensure we use bash, and work within our catkin worksapce
defaults:
run:
shell: bash
steps:
# Create directory to check out the code to
- name: Create catkin_ws directory
run: |
mkdir -p $GITHUB_WORKSPACE/catkin_ws/src
# Check out the Spot ROS code
- name: Checkout SpotROS
uses: actions/checkout@v3
with:
path: catkin_ws/src/spot_ros
- name: Checkout Spot Wrapper
uses: actions/checkout@v3
with:
repository: jeremysee2/spot_wrapper #TODO: Change to bdaiinstitute once merged
path: catkin_ws/src/spot_ros/spot_wrapper
# Install the required packages
- name: Install dependencies (minus qttools)
run: |
sudo apt-get update && \
sudo apt-get install -y \
python3-pip \
ros-noetic-tf2-bullet
pip install cython \
bosdyn-client \
bosdyn-mission \
bosdyn-api \
bosdyn-core \
empy
working-directory: catkin_ws/
# Install SpotWrapper
- name: Install SpotWrapper
run: |
cd $GITHUB_WORKSPACE/catkin_ws/src/spot_ros
pip install -r spot_wrapper/requirements.txt
pip install -e spot_wrapper
- name: Check that code has been downloaded correctly
run: |
ls $GITHUB_WORKSPACE/catkin_ws/src
ls $GITHUB_WORKSPACE/catkin_ws/src/spot_ros
# Build our workspace
- name: Build workspace for spot_driver
run: |
source /opt/ros/noetic/setup.bash
rosdep update
rosdep install --from-paths src --ignore-src -y
ls $GITHUB_WORKSPACE/catkin_ws
catkin_make --only-pkg-with-deps spot_driver
working-directory: catkin_ws/
# Run our ROS test!
- name: Run tests
run: |
source devel/setup.bash &&
rostest spot_driver run_tests.test --text
working-directory: catkin_ws/