mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 15:02:57 +00:00
Test in the same step as build
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Download parent image, build new one, upload it to GitHub artifacts
|
||||
name: Download parent image, build new one, test it and upload to GitHub artifacts
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
@@ -21,7 +21,7 @@ on:
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build-upload:
|
||||
build-test-upload:
|
||||
runs-on: ${{ inputs.runsOn }}
|
||||
steps:
|
||||
- name: Checkout Repo ⚡️
|
||||
@@ -43,10 +43,14 @@ jobs:
|
||||
# Full logs for CI build
|
||||
BUILDKIT_PROGRESS: plain
|
||||
shell: bash
|
||||
|
||||
- name: Run tests ✅
|
||||
run: python3 -m tests.run_tests --short-image-name ${{ inputs.image }}
|
||||
shell: bash
|
||||
|
||||
- name: Save image as a tar for later use 💾
|
||||
run: docker save jupyter/${{ inputs.image }} -o /tmp/${{ inputs.image }}-${{ inputs.platform }}.tar
|
||||
shell: bash
|
||||
|
||||
- name: Upload image as artifact 💾
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
36
.github/workflows/docker-test.yml
vendored
36
.github/workflows/docker-test.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: Download image artifact from GitHub artifacts and test it
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
image:
|
||||
description: Image name
|
||||
required: true
|
||||
type: string
|
||||
platform:
|
||||
description: Image platform
|
||||
required: true
|
||||
type: string
|
||||
runsOn:
|
||||
description: GitHub Actions Runner image
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ inputs.runsOn }}
|
||||
steps:
|
||||
- name: Checkout Repo ⚡️
|
||||
uses: actions/checkout@v3
|
||||
- name: Create dev environment 📦
|
||||
uses: ./.github/actions/create-dev-env
|
||||
|
||||
- name: Load image to docker 📥
|
||||
uses: ./.github/actions/load-image
|
||||
with:
|
||||
image: ${{ inputs.image }}
|
||||
platform: ${{ inputs.platform }}
|
||||
|
||||
- name: Run tests ✅
|
||||
run: python3 -m tests.run_tests --short-image-name ${{ inputs.image }}
|
||||
shell: bash
|
132
.github/workflows/docker.yml
vendored
132
.github/workflows/docker.yml
vendored
@@ -7,8 +7,7 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/docker.yml"
|
||||
- ".github/workflows/docker-build-upload.yml"
|
||||
- ".github/workflows/docker-test.yml"
|
||||
- ".github/workflows/docker-build-test-upload.yml"
|
||||
- ".github/workflows/docker-tag-manifest-push.yml"
|
||||
- ".github/workflows/docker-wiki-update.yml"
|
||||
|
||||
@@ -34,8 +33,7 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- ".github/workflows/docker.yml"
|
||||
- ".github/workflows/docker-build-upload.yml"
|
||||
- ".github/workflows/docker-test.yml"
|
||||
- ".github/workflows/docker-build-test-upload.yml"
|
||||
- ".github/workflows/docker-tag-manifest-push.yml"
|
||||
- ".github/workflows/docker-wiki-update.yml"
|
||||
|
||||
@@ -63,152 +61,88 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-amd64-base:
|
||||
uses: ./.github/workflows/docker-build-upload.yml
|
||||
amd64-base:
|
||||
uses: ./.github/workflows/docker-build-test-upload.yml
|
||||
with:
|
||||
parentImage: ""
|
||||
image: base-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
test-amd64-base:
|
||||
needs: [build-amd64-base]
|
||||
uses: ./.github/workflows/docker-test.yml
|
||||
with:
|
||||
image: base-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
build-amd64-minimal:
|
||||
needs: [build-amd64-base]
|
||||
uses: ./.github/workflows/docker-build-upload.yml
|
||||
amd64-minimal:
|
||||
needs: [amd64-base]
|
||||
uses: ./.github/workflows/docker-build-test-upload.yml
|
||||
with:
|
||||
parentImage: base-notebook
|
||||
image: minimal-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
test-amd64-minimal:
|
||||
needs: [build-amd64-minimal]
|
||||
uses: ./.github/workflows/docker-test.yml
|
||||
with:
|
||||
image: minimal-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
build-amd64-scipy:
|
||||
needs: [build-amd64-minimal]
|
||||
uses: ./.github/workflows/docker-build-upload.yml
|
||||
amd64-scipy:
|
||||
needs: [amd64-minimal]
|
||||
uses: ./.github/workflows/docker-build-test-upload.yml
|
||||
with:
|
||||
parentImage: minimal-notebook
|
||||
image: scipy-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
test-amd64-scipy:
|
||||
needs: [build-amd64-scipy]
|
||||
uses: ./.github/workflows/docker-test.yml
|
||||
with:
|
||||
image: scipy-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
build-amd64-r:
|
||||
needs: [build-amd64-minimal]
|
||||
uses: ./.github/workflows/docker-build-upload.yml
|
||||
amd64-r:
|
||||
needs: [amd64-minimal]
|
||||
uses: ./.github/workflows/docker-build-test-upload.yml
|
||||
with:
|
||||
parentImage: minimal-notebook
|
||||
image: r-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
test-amd64-r:
|
||||
needs: [build-amd64-r]
|
||||
uses: ./.github/workflows/docker-test.yml
|
||||
with:
|
||||
image: r-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
build-amd64-tensorflow:
|
||||
needs: [build-amd64-scipy]
|
||||
uses: ./.github/workflows/docker-build-upload.yml
|
||||
amd64-tensorflow:
|
||||
needs: [amd64-scipy]
|
||||
uses: ./.github/workflows/docker-build-test-upload.yml
|
||||
with:
|
||||
parentImage: scipy-notebook
|
||||
image: tensorflow-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
test-amd64-tensorflow:
|
||||
needs: [build-amd64-tensorflow]
|
||||
uses: ./.github/workflows/docker-test.yml
|
||||
with:
|
||||
image: tensorflow-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
build-amd64-datascience:
|
||||
needs: [build-amd64-scipy]
|
||||
uses: ./.github/workflows/docker-build-upload.yml
|
||||
amd64-datascience:
|
||||
needs: [amd64-scipy]
|
||||
uses: ./.github/workflows/docker-build-test-upload.yml
|
||||
with:
|
||||
parentImage: scipy-notebook
|
||||
image: datascience-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
test-amd64-datascience:
|
||||
needs: [build-amd64-datascience]
|
||||
uses: ./.github/workflows/docker-test.yml
|
||||
with:
|
||||
image: datascience-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
build-amd64-pyspark:
|
||||
needs: [build-amd64-scipy]
|
||||
uses: ./.github/workflows/docker-build-upload.yml
|
||||
amd64-pyspark:
|
||||
needs: [amd64-scipy]
|
||||
uses: ./.github/workflows/docker-build-test-upload.yml
|
||||
with:
|
||||
parentImage: scipy-notebook
|
||||
image: pyspark-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
test-amd64-pyspark:
|
||||
needs: [build-amd64-pyspark]
|
||||
uses: ./.github/workflows/docker-test.yml
|
||||
with:
|
||||
image: pyspark-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
build-amd64-all-spark:
|
||||
needs: [build-amd64-pyspark]
|
||||
uses: ./.github/workflows/docker-build-upload.yml
|
||||
amd64-all-spark:
|
||||
needs: [amd64-pyspark]
|
||||
uses: ./.github/workflows/docker-build-test-upload.yml
|
||||
with:
|
||||
parentImage: pyspark-notebook
|
||||
image: all-spark-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
test-amd64-all-spark:
|
||||
needs: [build-amd64-all-spark]
|
||||
uses: ./.github/workflows/docker-test.yml
|
||||
with:
|
||||
image: all-spark-notebook
|
||||
platform: amd64
|
||||
runsOn: ubuntu-latest
|
||||
|
||||
amd64-images-tag-push:
|
||||
needs:
|
||||
[
|
||||
test-amd64-base,
|
||||
test-amd64-minimal,
|
||||
test-amd64-scipy,
|
||||
test-amd64-r,
|
||||
test-amd64-tensorflow,
|
||||
test-amd64-datascience,
|
||||
test-amd64-pyspark,
|
||||
test-amd64-all-spark,
|
||||
amd64-base,
|
||||
amd64-minimal,
|
||||
amd64-scipy,
|
||||
amd64-r,
|
||||
amd64-tensorflow,
|
||||
amd64-datascience,
|
||||
amd64-pyspark,
|
||||
amd64-all-spark,
|
||||
]
|
||||
uses: ./.github/workflows/docker-tag-manifest-push.yml
|
||||
with:
|
||||
|
Reference in New Issue
Block a user