-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (36 loc) · 1.08 KB
/
build_and_test.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
name: Docker Image CI
on:
push:
branches: [ "dev*", "master" ]
pull_request:
branches: [ "dev" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
TEST_TAG: astazero/atos_docker_env:test
jobs:
build_and_test_docker_image:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
load: true
tags: ${{ env.TEST_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run colcon test on docker image
run: |
docker run --rm ${{ env.TEST_TAG }} bash -c "colcon test --return-code-on-test-failure --event-handlers console_cohesion+"
- name: Run scenario integration test
run: |
docker compose -f docker-compose-test.yml up --abort-on-container-exit