Display console outputs for all tests #222
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
install_tests: | |
name: Install check using pipx | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
container: ['ros:iron', 'ros:jazzy', 'ros:rolling'] | |
container: ${{ matrix.container }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pip | |
run: apt update && apt install -y python3-pip python3-pytest | |
- name: Install apt dependencies | |
run: apt update && apt install -y doxygen graphviz pipx python3-sphinx | |
- name: Smoke test of pipx install | |
run: | | |
PATH="$HOME/.local/bin:$PATH" | |
pipx install . | |
rosdoc2 build -d tmp/docs_build -c /tmp/cross_references -o /tmp/docs_output -p test/packages/full_package | |
if [ ! -f /tmp/docs_output/full_package/index.html ]; then | |
echo "Failed to find any output from rosdoc2" | |
exit 2 | |
else | |
echo "rosdoc2 ran successfully under pipx" | |
fi | |
unit_tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
container: ['ros:iron', 'ros:rolling'] | |
container: ${{ matrix.container }} | |
env: | |
PIP_BREAK_SYSTEM_PACKAGES: 1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pip | |
run: | | |
apt update && apt install -y \ | |
python3-pip \ | |
python3-pytest \ | |
python3-flake8 \ | |
python3-flake8-blind-except \ | |
python3-flake8-builtins \ | |
python3-flake8-class-newline \ | |
python3-flake8-comprehensions \ | |
python3-flake8-deprecated \ | |
python3-flake8-docstrings \ | |
python3-flake8-import-order \ | |
python3-flake8-quotes | |
- name: Install apt dependencies | |
run: apt update && apt install -y doxygen graphviz | |
- name: Install pip dependencies | |
run: | | |
python3 -m pip install .[test] | |
python3 -m pip freeze | |
- name: Run tests | |
run: python3 -m pytest --verbose -rA test |