-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update CI pipeline image build tests (#595)
- Move build-and-test-image to actions - Run image test on PR and push to main - Run tests against amd64 arch (arm64 CI takes way too long (30+ minutes) due to poor emulator performance)
- Loading branch information
Showing
3 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: build-and-test-image | ||
description: Build and test the container image | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Build container image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64 | ||
tags: localhost/ansible-rulebook:test | ||
load: true | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: > | ||
docker run --rm -u 0 localhost/ansible-rulebook:test bash -c ' | ||
pip install -r requirements_test.txt && | ||
pytest -m "e2e" -n auto' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters