-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (54 loc) · 1.74 KB
/
test_docker.yaml
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
name: test-docker-workflow
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- humble
- iron
- jazzy
schedule:
- cron: '0 0 * * *'
jobs:
docker-tests:
runs-on: ubuntu-22.04
env:
VULCANEXUS_COMPOSE_TEST_DOCKER_IMAGE: "vulcanexus:ci"
steps:
- name: Sync repository
uses: eProsima/eProsima-CI/external/checkout@v0
with:
path: src
# ref: main
ref: feature/fastdds-cli-package
- name: Build Vulcanexus Docker image
run: |
cd ./src/.github/docker
docker build \
--no-cache \
-t ${{ env.VULCANEXUS_COMPOSE_TEST_DOCKER_IMAGE }} \
-f Dockerfile .
- name: Check if Docker images exist
run: |
[ -n "$(docker images -q ${{ env.VULCANEXUS_COMPOSE_TEST_DOCKER_IMAGE }})" ] || echo "Vulcanexus Docker image does not exist"
- name: Install colcon
uses: eProsima/eProsima-CI/ubuntu/install_colcon@main
- name: Install GTest
uses: eProsima/eProsima-CI/ubuntu/install_gtest@main
- name: Compile docker tests
uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0
with:
workspace: ${{ github.workspace }}
colcon_build_args: --packages-up-to vulcanexus_test
cmake_args: -DBUILD_COMPOSE_TESTS=ON
- name: Run tests
run: |
export VULCANEXUS_COMPOSE_TEST_DOCKER_IMAGE=${{ env.VULCANEXUS_COMPOSE_TEST_DOCKER_IMAGE }}
source install/setup.bash
colcon test \
--packages-select vulcanexus_test \
--event-handlers console_direct+ \
--return-code-on-test-failure \
--ctest-args \
--timeout 120