diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 225b7a4a..ab072550 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