Skip to content

[SW-642] Make it obvious when spot is running out of battery #984

[SW-642] Make it obvious when spot is running out of battery

[SW-642] Make it obvious when spot is running out of battery #984

Workflow file for this run

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 --packages-skip proto2ros_tests
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 proto2ros_tests
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