mirror of
https://github.com/outbackdingo/debos.git
synced 2026-01-28 02:18:45 +00:00
Run recipe tests using UML on GitHub actions
Running the tests on the host is a good first step; to test Debos properly we should run inside a Fakemachine. Since GitHub actions do not support creating nested virtual machines, use the user-mode-linux backend in Fakemachine to create a user process to run the tests inside of. Since Docker autobuild does not support UML the docker-compose file purposely does not have a suffix of `.test.yml` so that the test will not be picked up to run on Docker autobuild. Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
This commit is contained in:
committed by
Sjoerd Simons
parent
ea8aca057e
commit
c66a48d699
5
.github/workflows/build-test.yaml
vendored
5
.github/workflows/build-test.yaml
vendored
@@ -22,3 +22,8 @@ jobs:
|
||||
run: |
|
||||
docker-compose -f docker/recipes.test.yml \
|
||||
up --build --exit-code-from=sut
|
||||
|
||||
- name: Run test recipes using UML backend
|
||||
run: |
|
||||
docker-compose -f docker/recipes-test-uml.yml \
|
||||
up --build --exit-code-from=sut
|
||||
|
||||
@@ -39,3 +39,8 @@ Run test recipes on host:
|
||||
```
|
||||
docker-compose -f docker/recipes.test.yml up --build --exit-code-from=sut
|
||||
```
|
||||
|
||||
Run test recipes using UML backend:
|
||||
```
|
||||
docker-compose -f docker/recipes-test-uml.yml up --build --exit-code-from=sut
|
||||
```
|
||||
|
||||
23
docker/recipes-test-uml.yml
Normal file
23
docker/recipes-test-uml.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: '3.6'
|
||||
|
||||
services:
|
||||
sut:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: docker/Dockerfile
|
||||
target: runner
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../tests
|
||||
target: /recipes
|
||||
tmpfs:
|
||||
- /scratch:exec
|
||||
environment:
|
||||
- TMP=/scratch
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
security_opt:
|
||||
- label:disable
|
||||
working_dir: /recipes
|
||||
entrypoint: ./tests.sh
|
||||
command: --fakemachine-backend=uml
|
||||
Reference in New Issue
Block a user