Added tests to CI
Some checks failed
Build and Push Docker Images / build-and-push (push) Failing after 58s
Some checks failed
Build and Push Docker Images / build-and-push (push) Failing after 58s
This commit is contained in:
parent
57d1335fba
commit
c8046eb98f
@ -24,7 +24,35 @@ jobs:
|
||||
username: adrien
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push Base image
|
||||
# --- 1. BUILD & TEST BASE IMAGE ---
|
||||
- name: Extract metadata for Base
|
||||
id: meta-base
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.BASE_IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=ref,event=branch
|
||||
type=sha,format=short
|
||||
type=semver,pattern={{version}}
|
||||
|
||||
- name: Build Base image (Local)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./images/base
|
||||
file: ./images/base/dockerfile
|
||||
load: true
|
||||
tags: ${{ steps.meta-base.outputs.tags }}
|
||||
labels: ${{ steps.meta-base.outputs.labels }}
|
||||
|
||||
- name: Test Base image
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v ${{ github.workspace }}/tests:/tests \
|
||||
${{ env.REGISTRY }}/${{ env.BASE_IMAGE_NAME }}:${{ steps.meta-base.outputs.version }} \
|
||||
python3 /tests/base.py
|
||||
|
||||
- name: Push Base image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./images/base
|
||||
@ -33,7 +61,37 @@ jobs:
|
||||
tags: ${{ steps.meta-base.outputs.tags }}
|
||||
labels: ${{ steps.meta-base.outputs.labels }}
|
||||
|
||||
- name: Build and push Jupyter image
|
||||
# --- 2. BUILD & TEST JUPYTER IMAGE ---
|
||||
- name: Extract metadata for Jupyter
|
||||
id: meta-jupyter
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.JUPYTER_IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=ref,event=branch
|
||||
type=sha,format=short
|
||||
type=semver,pattern={{version}}
|
||||
|
||||
- name: Build Jupyter image (Local)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./images/jupyter
|
||||
file: ./images/jupyter/dockerfile
|
||||
load: true
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ env.REGISTRY }}/${{ env.BASE_IMAGE_NAME }}:${{ steps.meta-base.outputs.version }}
|
||||
tags: ${{ steps.meta-jupyter.outputs.tags }}
|
||||
labels: ${{ steps.meta-jupyter.outputs.labels }}
|
||||
|
||||
- name: Test Jupyter dependencies
|
||||
run: |
|
||||
docker run --rm \
|
||||
-v ${{ github.workspace }}/tests:/tests \
|
||||
${{ env.REGISTRY }}/${{ env.JUPYTER_IMAGE_NAME }}:${{ steps.meta-base.outputs.version }} \
|
||||
python3 /tests/dependencies.py
|
||||
|
||||
- name: Push Jupyter image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./images/jupyter
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user