3434
3535 pull_request : # This will allow to trigger on PR only with a specific label
3636 types : [opened, reopened, synchronize, labeled, unlabeled]
37- # https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
37+ # Concurrency : auto-cancel "old" jobs ie when pushing again
38+ # https://docs.github.com/fr/actions/using-jobs/using-concurrency
39+ concurrency :
40+ group : ${{ github.workflow }}-${{ github.ref || github.run_id }}
41+ cancel-in-progress : true
3842env :
3943 RUN_TESTS : false
4044 BUILD_ONLY : false
4145 REGISTRY_IMAGE : giskardai/giskard
4246 DOCKERHUB_USER : giskardai
47+ # https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
4348jobs :
4449 build-images :
4550 # Debug
@@ -130,13 +135,14 @@ jobs:
130135 username : ${{ env.DOCKERHUB_USER }}
131136 password : ${{ secrets.DOCKERHUB_TOKEN }}
132137
133- - name : Run python test inside docker
138+ - name : Install deps inside docker
134139 if : ${{ env.RUN_TESTS }}
135140 uses : docker/build-push-action@v5
136141 with :
137142 context : .
138- target : test -python
143+ target : full-install -python
139144 push : false
145+ load : true
140146 tags : ${{ steps.meta.outputs.tags }}
141147 labels : ${{ steps.meta.outputs.labels }}
142148 builder : ${{ steps.builder.outputs.name }}
@@ -145,20 +151,35 @@ jobs:
145151 cache-from : type=gha
146152 cache-to : type=gha,mode=max
147153
148- - name : Run python integration test inside docker
154+ - name : Run python test inside docker
149155 if : ${{ env.RUN_TESTS }}
150156 uses : docker/build-push-action@v5
151157 with :
152158 context : .
153- target : integration- test-python
159+ target : test-python
154160 push : false
161+ load : false
155162 tags : ${{ steps.meta.outputs.tags }}
156163 labels : ${{ steps.meta.outputs.labels }}
157164 builder : ${{ steps.builder.outputs.name }}
158165 platforms : |
159166 ${{ matrix.platform}}
160167 cache-from : type=gha
161- cache-to : type=gha,mode=max
168+
169+ # - name: Run python integration test inside docker
170+ # if: ${{ env.RUN_TESTS }}
171+ # uses: docker/build-push-action@v5
172+ # with:
173+ # context: .
174+ # target: integration-test-python
175+ # push: false
176+ # load: false
177+ # tags: ${{ steps.meta.outputs.tags }}
178+ # labels: ${{ steps.meta.outputs.labels }}
179+ # builder: ${{ steps.builder.outputs.name }}
180+ # platforms: |
181+ # ${{ matrix.platform}}
182+ # cache-from: type=gha
162183
163184 - name : Build and push
164185 id : build
0 commit comments