-
Notifications
You must be signed in to change notification settings - Fork 9
106 lines (83 loc) · 2.86 KB
/
test.yaml
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
name: Test
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install --no-interaction
- name: Check Lint and Format
run: poetry run task check
test-ros1:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup ROS environment
run: |
sudo apt update -q
sudo apt install -yqq curl gnupg2
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
echo "deb http://packages.ros.org/ros/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/ros-latest.list > /dev/null
sudo apt update -q
sudo apt install -yqq \
ros-noetic-ros-base \
ros-noetic-rospy
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install --no-interaction
- name: Unit Test
run: |
source /opt/ros/noetic/setup.bash
roscore &
poetry run task test
test-ros2:
strategy:
fail-fast: false
matrix:
ros:
- { distro: humble, os: ubuntu-22.04 }
- { distro: iron, os: ubuntu-22.04 }
- { distro: rolling, os: ubuntu-22.04 }
runs-on: ${{ matrix.ros.os }}
steps:
- uses: actions/checkout@v4
- name: Setup ROS environment
run: |
sudo apt update -q
sudo apt install -yqq curl
keyring=/usr/share/keyrings/ros-archive-keyring.gpg
codename=$(. /etc/os-release && echo $UBUNTU_CODENAME)
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o ${keyring}
echo "deb [arch=$(dpkg --print-architecture) signed-by=${keyring}] http://packages.ros.org/ros2/ubuntu ${codename} main" |
sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update -q
sudo apt install -yqq \
ros-${{ matrix.ros.distro }}-ros-base \
ros-${{ matrix.ros.distro }}-rclpy
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install --no-interaction
- name: Unit Test
run: |
source /opt/ros/${{ matrix.ros.distro }}/setup.bash
poetry run task test