CI overhaul #21
This file contains hidden or 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: Tests | ||
| on: | ||
| merge_group: | ||
| pull_request: | ||
| # alias act='act --container-architecture linux/amd64 -P ubuntu-latest=quay.io/jamezp/act-maven' | ||
| jobs: | ||
| run-unit-tests: | ||
| name: Run unit tests | ||
| uses: ./.github/workflows/_unit-tests.yml | ||
| # with: | ||
| # java_versions: ${{ github.event_name == 'merge_group' && '"17","21"' || '"17"' }} | ||
| run-docs-compilation-tests: | ||
| name: Run docs compilation tests | ||
| needs: [run-unit-tests] | ||
| if: github.event_name == 'merge_group' | ||
| uses: ./.github/workflows/_docs-compile-tests.yml | ||
| secrets: inherit | ||
| run-hcd-integration-tests: | ||
| name: Run HCD integration tests | ||
| needs: [run-unit-tests] | ||
| if: github.event_name == 'merge_group' | ||
| uses: ./.github/workflows/_hcd-integration-tests.yml | ||
| secrets: inherit | ||
| can-enqueue: | ||
| name: Can enqueue | ||
| needs: [run-unit-tests] | ||
| if: always() && github.event_name != 'merge_group' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check outcomes | ||
| run: | | ||
| echo '${{ toJSON(needs) }}' | jq -e 'to_entries | map(.value.result == "success" or .value.result == "skipped") | all' | ||
| can-merge: | ||
| name: Can merge | ||
| needs: [run-unit-tests, run-docs-compilation-tests, run-hcd-integration-tests] | ||
| if: always() && github.event_name == 'merge_group' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check outcomes | ||
| run: | | ||
| echo '${{ toJSON(needs) }}' | jq -e 'to_entries | map(.value.result == "success" or .value.result == "skipped") | all' | ||