-
Notifications
You must be signed in to change notification settings - Fork 11
79 lines (66 loc) · 1.99 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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 test