-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (54 loc) · 1.67 KB
/
build-and-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
name: build-and-test
on:
pull_request:
branches: [main]
jobs:
build_and_test:
strategy:
matrix:
os:
- ubuntu-22.04
rosdistro:
- humble
runs-on: ubuntu-latest
container:
image: ros:${{ matrix.rosdistro }}-ros-base
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
path: wheel_stuck_ws
- name: Install dependencies
run: |
cd wheel_stuck_ws &&
rosdep update &&
apt-get update &&
vcs import src < depend_packages_ci.repos &&
rosdep install --from-path . -i -y --rosdistro ${{ matrix.rosdistro }}
- name: Install diagnostic-updater
run: apt-get install ros-${{ matrix.rosdistro }}-diagnostic-updater
- name: Build tests
id: build_test
run: |
. /opt/ros/${{ matrix.rosdistro }}/setup.sh &&
colcon build
continue-on-error: true
- name: build_test command success
if: steps.build_test.outcome == 'success'
run: echo "result - success"
- name: build_test command failure
if: steps.build_test.outcome == 'failure'
run: echo "result - failure" && exit 1
- name: Run tests
id: run_test
run: |
. /opt/ros/${{ matrix.rosdistro }}/setup.sh &&
colcon test &&
colcon test-result
continue-on-error: true
- name: run_test command success
if: steps.run_test.outcome == 'success'
run: echo "result - success"
- name: run_test command failure
if: steps.run_test.outcome == 'failure'
run: echo "result - failure" && exit 1