diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml new file mode 100644 index 000000000000..e3a525450abd --- /dev/null +++ b/.github/workflows/all.yml @@ -0,0 +1,25 @@ +name: all + +on: + workflow_call: + inputs: + needs: + required: true + type: string + +jobs: + all: + name: All + runs-on: ubuntu-latest + steps: + - name: Require all successes + shell: python + env: + RESULTS: ${{ toJSON(fromJSON(inputs.needs).*.result) }} + run: | + import json + import os + import sys + + results = json.loads(os.environ["RESULTS"]) + sys.exit(0 if all(result == "success" for result in results) else 1) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f347ac022b20..c00cec7240eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,3 +75,13 @@ jobs: concurrency_name: windows configuration: ${{ needs.configure.outputs.configuration }} runs-on: windows-latest + + all: + uses: ./.github/workflows/all.yml + if: always() + needs: + - macos + - ubuntu + - windows + with: + needs: ${{ toJSON(needs) }}