Skip to content

Commit 6828a12

Browse files
committed
Add job to build and test docker image
1 parent 1ad6c33 commit 6828a12

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Unit tests run in CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- jazzy
8+
- jazzy-dev
9+
10+
pull_request:
11+
branches:
12+
- main
13+
- jazzy
14+
- jazzy-dev
15+
16+
concurrency:
17+
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
18+
cancel-in-progress: true
19+
20+
env:
21+
ROS_DOMAIN_ID: 88
22+
jobs:
23+
unit-tests:
24+
runs-on: self-hosted
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v7
29+
30+
- name: Pre-build docker image
31+
run: |
32+
./docker/run.sh --build -- echo "We have a working image!"
33+
34+
- name: Build code and run tests
35+
run: |
36+
./docker/run.sh --build -- bash -c ' \
37+
rm -rf build/* install/* log/* && \
38+
colcon build --symlink-install && \
39+
. install/setup.bash && \
40+
colcon test && \
41+
echo "CI test runner completed." '

0 commit comments

Comments
 (0)