From c4fd41cec183e9b1d837b24a343a4ac086b2619a Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 26 Sep 2023 17:43:41 +0200 Subject: [PATCH] ci: AAP-16400 - Run e2e tests for the docker image --- .github/workflows/build-image.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 225b7a4a5..ab0725501 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -13,7 +13,25 @@ env: QUAY_USER: ansible+eda_gha jobs: + build-and-test-image: + if: github.repository == 'ansible/ansible-rulebook' + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Build local image + run: docker build -t localhost/ansible-rulebook:test . + + - name: Run tests + run: > + docker run --rm -u 0 localhost/ansible-rulebook:test bash -c ' + pip install -r requirements_test.txt && + pytest -m "e2e" -n auto' + build-and-push-image: + if: github.repository == 'ansible/ansible-rulebook' runs-on: ubuntu-latest permissions: contents: read