Skip to content

Commit

Permalink
Splitting tests into two docker steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartorn committed Sep 19, 2023
1 parent cb8dd7f commit be48728
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,21 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Run python integration test inside docker
if: ${{ env.RUN_TESTS }}
uses: docker/build-push-action@v5
with:
context: .
target: integration-test-python
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
builder: ${{ steps.builder.outputs.name }}
platforms: |
${{ matrix.platform}}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push
id: build
uses: docker/build-push-action@v5
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ RUN pdm build
# stage, but not in the production one
RUN WHEEL=$(ls dist/giskard*.whl) && .venv-prod/bin/pip install $WHEEL\[server\]

FROM build-python AS test-python
FROM build-python AS full-install-python
# TODO(Bazire): have a complete pass over deps to ensure what is where
RUN pdm install -G :all
RUN pdm run test

FROM full-install-python AS test-python
RUN pdm run test -m 'not slow'

FROM full-install-python AS integration-test-python
RUN pdm run test -m 'slow'

FROM eclipse-temurin:17-jdk-jammy as build-back-front
ARG FRONTEND_ENV=production
Expand Down

0 comments on commit be48728

Please sign in to comment.