Skip to content

Test the contributed recipes #193

Test the contributed recipes

Test the contributed recipes #193

name: Test the contributed recipes
on:
schedule:
# Images are rebuilt at 03:00 on Monday UTC
# So we're testing recipes one hour in advance
# They will also be tested after building images
- cron: "0 2 * * 1"
pull_request:
paths:
- ".github/workflows/contributed-recipes.yml"
- "docs/using/recipe_code/**"
push:
branches:
- main
paths:
- ".github/workflows/contributed-recipes.yml"
- "docs/using/recipe_code/**"
workflow_dispatch:
workflow_call:
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4
- name: Calculate recipes matrix 🛠
id: set-matrix
run: docs/using/recipe_code/generate_matrix.py >> "${GITHUB_OUTPUT}"
test-recipes:
runs-on: ${{ matrix.runs-on }}
needs: generate-matrix
if: github.repository_owner == 'jupyter'
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4
- name: Build recipe 🛠
# We're pulling here to avoid accidentally using an image that might be present on aarch64 self-hosted runner
run: docker build --pull --rm --force-rm --tag my-custom-image -f ./${{ matrix.dockerfile }} ./
env:
DOCKER_BUILDKIT: 1
# Full logs for CI build
BUILDKIT_PROGRESS: plain
working-directory: docs/using/recipe_code
shell: bash
strategy:
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}