Test the contributed recipes #237
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" | |
env: | |
REPOSITORY_OWNER: ${{ github.repository_owner }} | |
test-recipes: | |
runs-on: ${{ matrix.runs-on }} | |
needs: generate-matrix | |
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru' | |
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) }} |