|
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - main |
7 | | - - wip_process |
8 | 7 | pull_request: |
9 | 8 | branches: |
10 | 9 | - main |
11 | 10 | - LTS-main-1.x |
12 | 11 |
|
13 | 12 | jobs: |
14 | 13 | build: |
15 | | - name: ubuntu-py311-integration |
| 14 | + name: ubuntu-py39-integration |
16 | 15 | runs-on: ubuntu-latest |
17 | 16 | steps: |
18 | | - - uses: actions/checkout@v2 |
19 | | - - name: Set up Python 3.11 |
20 | | - uses: actions/setup-python@v2 |
| 17 | + - uses: actions/checkout@v5 |
| 18 | + - name: Set up Python 3.9 |
| 19 | + uses: actions/setup-python@v5 |
21 | 20 | with: |
22 | | - python-version: '3.11' |
23 | | - - name: Set up docker containers |
| 21 | + python-version: '3.9' |
| 22 | + |
| 23 | + - name: Bring up both ROS stacks |
| 24 | + # Defaults: ROS 1 rosbridge on 9090, ROS 2 rosbridge on 9091, ROS 2 |
| 25 | + # HTTP assets on 9092. See `tests/integration_setup/README.md`. |
24 | 26 | run: | |
25 | | - docker compose -f "tests/integration_setup/docker-compose.yml" up -d --build |
| 27 | + docker compose -f tests/integration_setup/docker-compose.yml up -d --build |
| 28 | + docker compose -f tests/integration_setup/docker-compose-ros2.yml up -d --build |
26 | 29 | docker ps -a |
| 30 | +
|
27 | 31 | - name: Install dependencies |
28 | 32 | run: | |
29 | | - python -m pip install --upgrade pip |
30 | | - python -m pip install wheel |
31 | | - - name: Install |
32 | | - run: | |
| 33 | + python -m pip install --upgrade pip wheel |
33 | 34 | python -m pip install --no-cache-dir -r requirements-dev.txt |
34 | | - - name: Run integration tests |
| 35 | +
|
| 36 | + - name: Run tests + doctests |
| 37 | + # `COMPAS_FAB_RUN_ROS_INTEGRATION_TESTS=1` opts the `ros1_client` / |
| 38 | + # `ros2_client` fixtures into actually connecting (otherwise every |
| 39 | + # integration test is skipped). `--doctest-modules` picks up |
| 40 | + # doctests embedded in `src/compas_fab/` modules. |
| 41 | + env: |
| 42 | + COMPAS_FAB_RUN_ROS_INTEGRATION_TESTS: "1" |
35 | 43 | run: | |
36 | 44 | pytest --doctest-modules |
37 | | - pytest docs |
| 45 | +
|
38 | 46 | - name: Tear down docker containers |
| 47 | + if: always() |
39 | 48 | run: | |
40 | | - docker compose -f "tests/integration_setup/docker-compose.yml" down |
| 49 | + docker compose -f tests/integration_setup/docker-compose.yml down |
| 50 | + docker compose -f tests/integration_setup/docker-compose-ros2.yml down |
0 commit comments