mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-18 15:32:56 +00:00
Add test-image action
This commit is contained in:
22
.github/actions/test-image/action.yml
vendored
Normal file
22
.github/actions/test-image/action.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: "Pull and test image"
|
||||||
|
description: "Download image from GitHub artifacts and test it"
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
imageName:
|
||||||
|
description: "Image name to be tested"
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Download built image 📥
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.imageName }}
|
||||||
|
path: /tmp/
|
||||||
|
- name: Load downloaded image to docker 📥
|
||||||
|
run: |
|
||||||
|
docker load --input /tmp/${{ inputs.imageName }}.tar
|
||||||
|
docker image ls -a
|
||||||
|
- name: Run tests ✅
|
||||||
|
run: python3 -m tests.run_tests --short-image-name ${{ inputs.imageName }}
|
17
.github/workflows/build-docker.yml
vendored
17
.github/workflows/build-docker.yml
vendored
@@ -57,7 +57,8 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Create dev environment 📦
|
- name: Create dev environment 📦
|
||||||
uses: ./.github/actions/create-dev-env
|
uses: ./.github/actions/create-dev-env
|
||||||
- name: Build image 🛠
|
|
||||||
|
- name: Build and push image as GitHub artifact 🛠
|
||||||
uses: ./.github/actions/build-push-image
|
uses: ./.github/actions/build-push-image
|
||||||
with:
|
with:
|
||||||
imageName: base-notebook
|
imageName: base-notebook
|
||||||
@@ -71,14 +72,8 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Create dev environment 📦
|
- name: Create dev environment 📦
|
||||||
uses: ./.github/actions/create-dev-env
|
uses: ./.github/actions/create-dev-env
|
||||||
- name: Download built image 📥
|
|
||||||
uses: actions/download-artifact@v3
|
- name: Pull image from GitHub artifacts and test it 🛠
|
||||||
|
uses: ./.github/actions/test-image
|
||||||
with:
|
with:
|
||||||
name: base-notebook
|
imageName: base-notebook
|
||||||
path: /tmp/
|
|
||||||
- name: Load downloaded image to docker 📥
|
|
||||||
run: |
|
|
||||||
docker load --input /tmp/base-notebook.tar
|
|
||||||
docker image ls -a
|
|
||||||
- name: Run tests ✅
|
|
||||||
run: python3 -m tests.run_tests --short-image-name base-notebook
|
|
||||||
|
Reference in New Issue
Block a user