Skip to content

Commit

Permalink
ci: aap-16400 - run e2e tests for the docker image (#583)
Browse files Browse the repository at this point in the history
Includes: 
- A new GitHub job to build the image locally and run the e2e test suite
inside the image.
- Reconfigure the build-push workflow to prevent executions in forks.

Co-authored-by: Tom Tuffin <[email protected]>
  • Loading branch information
Alex-Izquierdo and ttuffin authored Oct 4, 2023
1 parent 4d24720 commit 1a2212e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a2212e

Please sign in to comment.