Skip to content

Commit

Permalink
Switch to docker-compose for GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ll-nick committed Nov 7, 2024
1 parent ab28691 commit 0cd3a08
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/run-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,9 @@ jobs:

- name: Build Docker image for library unit tests
run: |
docker build --target unittest --tag arbitration_graphs_test .
- name: Run library unit tests in Docker container
run: |
docker run --rm arbitration_graphs_test
docker compose run --rm --build arbitration_graphs_test
- name: Build Docker image for demo unit tests
run: |
docker build --file demo/Dockerfile --target unittest --tag arbitration_graphs_demo_test demo
docker compose -f demo/docker-compose.yaml run --rm --build demo_test
- name: Run unit tests in Docker container
run: |
docker run --rm arbitration_graphs_demo_test
9 changes: 9 additions & 0 deletions demo/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
services:
demo_test:
image: ghcr.io/kit-mrt/arbitration_graphs_pacman_demo_test:$VERSION
build:
context: .
args:
- VERSION=$VERSION
target: unit_test
env_file: .env

tutorial:
image: ghcr.io/kit-mrt/arbitration_graphs_pacman_tutorial:$VERSION
build:
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ services:
image: ghcr.io/kit-mrt/arbitration_graphs:$VERSION
build: .
env_file: .env

arbitration_graphs_devel:
build:
context: .
Expand All @@ -12,3 +13,12 @@ services:
image: arbitration_graphs_devel:$VERSION
volumes:
- .:/home/blinky/arbitration_graphs

arbitration_graphs_test:
build:
context: .
target: unit_test
extends:
service: arbitration_graphs
image: arbitration_graphs_test:$VERSION

0 comments on commit 0cd3a08

Please sign in to comment.