name: Build Debos and run tests
on: [pull_request, push]

jobs:
  build-test:
    name: Build Debos and run tests
    runs-on: ubuntu-latest
    steps:
      - name: Repository checkout
        uses: actions/checkout@v2

      - name: Build container
        run: |
          docker build -f docker/Dockerfile -t godebos/debos .

      - name: Run unit tests
        run: |
          docker-compose -f docker/unit-tests.test.yml \
            up --build --exit-code-from=sut

      - name: Run test recipes on host
        run: |
          docker-compose -f docker/recipes.test.yml \
            up --build --exit-code-from=sut

Add GitHub actions pipeline to build Debos and run tests
Add GitHub actions pipeline to build Debos and run tests

Add a CI pipeline which tests the following on every push and PR:

 * builds debos docker container
 * runs the debos unit tests inside the container
 * runs the debos test recipes inside the container

Unfortunately GitHub actions do not allow nested virtualization (see
https://github.com/actions/virtual-environments/issues/183) so as a
first step, the tests are run on the host without fakemachine.

Signed-off-by: Christopher Obbard <0becaf7888cff31ba54e40b1ffb8263e09b8b7da@collabora.com>
