Skip to content

Use pipx to install build dependencies on GHA runners #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/actions/build-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ runs:
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
sudo apt install -y python3-pip python3-build pipx

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -37,7 +38,8 @@ runs:
shell: bash
id: ansible-builder-install
run: |
python3 -m pip install -U ansible-builder build
set -ex
python3 -m pipx install --force ansible-builder
python3 -m build --outdir final/dist/ --wheel

- name: Create a build context and Containerfile for base EE
Expand Down Expand Up @@ -83,14 +85,13 @@ runs:
- name: Squash image layers to save disk space
shell: bash
run: |
python3 -m pip install --upgrade docker-squash
python3 -m pipx install --force docker-squash
docker-squash ${{ inputs.namespace }}/${{ inputs.final_image }}:test

- name: Run tests against the container
shell: bash
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade "tox>=4.0.0"
python3 -m pipx install --force "tox>=4.0.0"
tox -e test-image -- --container-engine docker --image-name ${{ inputs.namespace }}/${{ inputs.final_image }}:test

- name: Push the built image to ${{ inputs.registry }} by digest for ${{ matrix.platform }}
Expand Down
Loading