Skip to content

Commit

Permalink
run tests without docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
barend-xebia committed Nov 28, 2024
1 parent 0007020 commit ae96489
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/dockerhub_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,19 +98,18 @@ jobs:
SPARK_VERSION=${{ matrix.image.SPARK_VERSION }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
# https://docs.docker.com/build/ci/github-actions/share-image-jobs/
outputs: type=docker,dest=/tmp/gdd-spark-${{ matrix.image.SPARK_VERSION }}.tar

- name: Test image
env:
IMAGE_NAME: "godatadriven/spark:${{ matrix.image.SPARK_VERSION }}"
run: |
docker load --input /tmp/gdd-spark-${{ matrix.image.SPARK_VERSION }}.tar
docker image ls -a
if [[ -f "docker-compose.test.yml" ]]; then
docker compose --file docker-compose.test.yml build --builder ${{ steps.setup-buildx.outputs.name }}
docker compose --file docker-compose.test.yml run sut
fi
IMAGE_NAME="godatadriven/spark:${{ matrix.image.SPARK_VERSION }}"
TEST_IMAGE_NAME="spark-image-tests:${{ matrix.image.SPARK_VERSION }}"
docker build \
--file tests/Dockerfile \
--build-arg IMAGE_NAME="${IMAGE_NAME}" \
--tag "${TEST_IMAGE_NAME}" \
./tests/
docker run --rm "${TEST_IMAGE_NAME}"
- name: Login to DockerHub
if: github.ref == 'refs/heads/master'
Expand Down

0 comments on commit ae96489

Please sign in to comment.