-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify the images being used for testing
- Loading branch information
Showing
1 changed file
with
18 additions
and
39 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 |
---|---|---|
|
@@ -13,19 +13,8 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.12', '3.13.0rc1', 'latest'] | ||
debian-version: ['bullseye', 'bookworm', 'latest'] | ||
slim: [true, false] | ||
image-tag: ['3.12-slim-bullseye', '3.13.0rc1', '3.13.0rc1-slim', 'latest'] | ||
update-strategy: [update, unlocked-install, latest-install] | ||
exclude: | ||
# Current installation covered in CI job | ||
- python-version: '3.12' | ||
debian-version: 'bullseye' | ||
slim: true | ||
# Current deployment using slim, no need to test. | ||
- python-version: '3.12' | ||
debian-version: 'bullseye' | ||
slim: false | ||
|
||
steps: | ||
- name: Checkout code | ||
|
@@ -34,35 +23,25 @@ jobs: | |
- name: Set up Docker Build | ||
uses: docker/[email protected] | ||
|
||
- name: Set image tag | ||
run: | | ||
if [ "${{ matrix.python-version }}" = "latest" ]; then | ||
IMAGE_TAG="latest" | ||
else | ||
IMAGE_TAG="${{ matrix.python-version }}" | ||
if [ "${{ matrix.slim }}" = "true" ]; then | ||
IMAGE_TAG="${IMAGE_TAG}-slim" | ||
fi | ||
if [ "${{ matrix.debian-version }}" != "latest" ]; then | ||
IMAGE_TAG="${IMAGE_TAG}-${{ matrix.debian-version }}" | ||
fi | ||
fi | ||
echo "Using image tag: ${IMAGE_TAG}" | ||
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV | ||
- name: Build current Docker image with tests | ||
run: | | ||
docker build --target test -t zephir-api2:test . | ||
|
||
- name: Install and update dependencies | ||
run: | | ||
echo "Image tag: ${{ matrix.image-tag }}" | ||
echo "Update strategy: ${{ matrix.update-strategy }}" | ||
if [[ "${{ matrix.update-strategy }}" == "update" ]]; then | ||
echo "Running normal test with updated dependencies" | ||
docker build --no-cache --build-arg IMAGE_TAG=${{ env.IMAGE_TAG }} --target test-update -t zephir-api2:test . | ||
echo "Running normal test with updated dependencies" | ||
docker build --no-cache --build-arg IMAGE_TAG=${{ matrix.image-tag }} --target test-update -t zephir-api2:test . | ||
elif [[ "${{ matrix.update-strategy }}" == "unlocked-install" ]]; then | ||
echo "Running normal test with updated dependencies" | ||
docker build --no-cache --build-arg IMAGE_TAG=${{ env.IMAGE_TAG }} --target build-unlocked-test -t zephir-api2:test . | ||
echo "Running normal test with updated dependencies" | ||
docker build --no-cache --build-arg IMAGE_TAG=${{ matrix.image-tag }} --target build-unlocked-test -t zephir-api2:test . | ||
elif [[ "${{ matrix.update-strategy }}" == "latest-install" ]]; then | ||
echo "Running normal test with updated dependencies" | ||
docker build --no-cache --build-arg IMAGE_TAG=${{ env.IMAGE_TAG }} --target build-latest-test -t zephir-api2:test . | ||
fi | ||
echo "Running normal test with updated dependencies" | ||
docker build --no-cache --build-arg IMAGE_TAG=${{ matrix.image-tag }} --target build-latest-test -t zephir-api2:test . | ||
fi |