-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.49 KB
/
run-unit-tests.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
name: Run unit tests
on:
push:
jobs:
build-and-run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Read version from file
run: |
cat version >> $GITHUB_ENV
- name: Build and core library Docker image using current repo state
uses: docker/build-push-action@v6
with:
push: false
tags: |
ghcr.io/kit-mrt/arbitration_graphs:${{ env.VERSION }}
target: install
- name: Build core library unit test Docker image
uses: docker/build-push-action@v6
with:
push: false
tags: |
ghcr.io/kit-mrt/arbitration_graphs_tests:${{ env.VERSION }}
target: unit_test
- name: Run library unit tests
run: |
docker run --rm ghcr.io/kit-mrt/arbitration_graphs_tests:${{ env.VERSION }}
- name: Build Pacman demo unit test Docker image
uses: docker/build-push-action@v6
with:
build-args: |
VERSION=${{ env.VERSION }}
context: demo
file: demo/Dockerfile
push: false
tags: |
ghcr.io/kit-mrt/arbitration_graphs_pacman_demo_tests:latest
ghcr.io/kit-mrt/arbitration_graphs_pacman_demo_tests:${{ env.VERSION }}
target: unit_test
- name: Run demo unit tests
run: |
docker run --rm ghcr.io/kit-mrt/arbitration_graphs_pacman_demo_tests:${{ env.VERSION }}