File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,6 +340,11 @@ jobs:
340340 with :
341341 repository : bevyengine/bevy
342342 ref : main
343+ - name : Keep initial state
344+ id : initial
345+ run : |
346+ initial=`toml get Cargo.toml example | jq -c '.[] | select(.name=="${{ matrix.example }}") | ."doc-scrape-examples"'`
347+ echo "initial=$initial" >> $GITHUB_OUTPUT
343348 - name : Checkout Releasability
344349 uses : actions/checkout@v4
345350 with :
@@ -356,8 +361,23 @@ jobs:
356361 sudo apt-get update;
357362 DEBIAN_FRONTEND=noninteractive sudo apt-get install --no-install-recommends -yq libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-dev libx264-164 libx264-dev
358363 - name : Document with scrapping example
364+ id : scrape
365+ continue-on-error : true
359366 run : |
360367 cargo +nightly doc -Zunstable-options -Zrustdoc-scrape-examples --no-deps
368+ - name : Fail when needed
369+ run : |
370+ if [[ ${{ steps.initial.outputs.initial }} == "false" ]]; then
371+ if [[ ${{ steps.scrape.outcome }} == "success" ]]; then
372+ echo "Failure expected but succeeded"
373+ exit 1
374+ fi
375+ else
376+ if [[ ${{ steps.scrape.outcome }} == "failure" ]]; then
377+ echo "Success expected but failed"
378+ exit 1
379+ fi
380+ fi
361381
362382 release-private-registry :
363383 name : Release to Private Registry
You can’t perform that action at this time.
0 commit comments