Bypass example-test for docs only changes (#449)
This commit is contained in:
@@ -36,3 +36,40 @@ jobs:
|
||||
|
||||
steps:
|
||||
- run: 'echo "Skipping tests"'
|
||||
|
||||
build-matrix:
|
||||
name: Build matrix
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/[email protected]
|
||||
|
||||
- id: set-matrix
|
||||
name: Collect all examples
|
||||
run: |
|
||||
examples="$(find examples -maxdepth 2 -type f -name run-tests.sh | xargs -I % dirname %)"
|
||||
examples_json="$(echo "$examples" | jq -c --slurp --raw-input 'split("\n") | map(select(. != ""))')"
|
||||
echo "${examples_json}"
|
||||
echo "examples=$examples_json" >>"$GITHUB_OUTPUT"
|
||||
|
||||
outputs:
|
||||
examples: ${{ steps.set-matrix.outputs.examples }}
|
||||
|
||||
example-test:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
needs:
|
||||
- build-matrix
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
k8s:
|
||||
- v1.27.2
|
||||
- v1.26.4
|
||||
- v1.25.9
|
||||
example:
|
||||
- ${{ fromJson(needs.build-matrix.outputs.examples) }}
|
||||
|
||||
steps:
|
||||
- run: 'echo "Skipping example-test"'
|
||||
|
||||
Reference in New Issue
Block a user