-
Notifications
You must be signed in to change notification settings - Fork 41
58 lines (52 loc) · 2.11 KB
/
integration.yml
File metadata and controls
58 lines (52 loc) · 2.11 KB
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
name: integration
on:
push:
branches:
- main
pull_request:
branches:
- main
- LTS-main-1.x
jobs:
build:
name: ubuntu-py39-integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Bring up both ROS stacks
# Defaults: ROS 1 rosbridge on 9090, ROS 2 rosbridge on 9091, ROS 2
# HTTP assets on 9092. See `tests/integration_setup/README.md`.
run: |
docker compose -f tests/integration_setup/docker-compose.yml up -d --build
docker compose -f tests/integration_setup/docker-compose-ros2.yml up -d --build
docker ps -a
- name: Install dependencies
# `pip install -r requirements-dev.txt` alone installs the dev tools
# but NOT the package itself nor its runtime deps. The top-level
# `conftest.py` then crashes on `from twisted.internet import ...`
# because twisted only arrives transitively via `roslibpy` (a runtime
# dep). Installing the package with the `[dev]` extra pulls both.
run: |
python -m pip install --upgrade pip wheel
python -m pip install --no-cache-dir -e ".[dev]"
- name: Run tests + doctests
# `COMPAS_FAB_RUN_ROS_INTEGRATION_TESTS=1` opts the `ros1_client` /
# `ros2_client` fixtures into actually connecting (otherwise every
# integration test is skipped). `--doctest-modules` picks up
# doctests embedded in `src/compas_fab/` modules.
env:
COMPAS_FAB_RUN_ROS_INTEGRATION_TESTS: "1"
# Opt the whole suite into roslibpy's new asyncio transport
# (websockets-based) instead of the historical twisted reactor.
ROSLIBPY_TRANSPORT: asyncio
run: |
pytest --doctest-modules
- name: Tear down docker containers
if: always()
run: |
docker compose -f tests/integration_setup/docker-compose.yml down
docker compose -f tests/integration_setup/docker-compose-ros2.yml down