-
Notifications
You must be signed in to change notification settings - Fork 64
65 lines (63 loc) · 1.96 KB
/
test.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
name: spot_ros2 CI
on:
pull_request:
push:
branches:
- main
workflow_call:
secrets:
CODECOV_TOKEN:
required: true
permissions:
contents: write
jobs:
build_and_test_package_and_docs:
name: build_and_test_package_and_docs
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container: ghcr.io/bdaiinstitute/spot_ros2_jammy_humble:main
steps:
- name: Checkout repo and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build package
run: |
apt-get update
apt install wget
./install_spot_ros2.sh
# go to root folder
cd ../../
source /opt/ros/$ROS_DISTRO/setup.bash
colcon build --symlink-install
source install/local_setup.bash
- name: Test Package
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
source install/local_setup.bash
# skip testing submodules
colcon test --python-testing pytest --pytest-with-coverage --event-handlers console_direct+ --packages-skip bdai_ros2_wrappers
working-directory: ${{ github.workspace }}/../../
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-error: true
flag-name: unittests
debug: true
files: $(find ../../ -name "coverage.xml" -type f)
- if: always()
run: colcon test-result --verbose
working-directory: ${{ github.workspace }}/../../
- name: Install docs dependencies & build docs
run: |
source /opt/ros/$ROS_DISTRO/setup.bash
pip install -r docs/requirements.txt
# go to documentation folder and build the .rst files
cd docs
# we don't use the --implicit-namespaces flag
sphinx-apidoc -f -o source/ ../ ../*setup* ../examples ../*launch.py ../*command_spot_driver.py
cd ..
sphinx-build docs _build -v