Skip to content

Examples using compose #177

Examples using compose

Examples using compose #177

Workflow file for this run

name: Test Examples
on:
pull_request:
workflow_dispatch:
jobs:
get-examples-with-changes:
runs-on: ubuntu-latest
outputs:
changed_directories: ${{ steps.set-output.outputs.changed_directories }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
with:
# only get the top level example dirs that have changes
dir_names: true
dir_names_max_depth: 1
dir_names_exclude_current_dir: true
exclude_submodules: true
files_ignore: |
*.md
.github/**/*
json: true
quotepath: false
- name: "Set output in the matrix format"
id: set-output
run: echo "changed_directories={\"dir\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
testing:
if: ${{ needs.get-examples-with-changes.outputs.changed_directories != '' }}
strategy:
matrix: ${{fromJson(needs.get-examples-with-changes.outputs.changed_directories)}}
fail-fast: false
needs:
- get-examples-with-changes
uses: ./.github/workflows/reusable_test_runner.yaml
with:
example-dir: ${{ matrix.dir }}