Make tests run under the 256 tests limit; give this repo the ❤️ it deserves. #366
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: "Test all metadata" | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - 'ci.json' | |
| concurrency: | |
| group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}" | |
| cancel-in-progress: true | |
| jobs: | |
| get-all-metadata: | |
| if: github.repository == 'oracle/graalvm-reachability-metadata' | |
| name: "📋 Get list of all supported libraries" | |
| runs-on: "ubuntu-22.04" | |
| timeout-minutes: 5 | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: "☁️ Checkout repository" | |
| uses: actions/checkout@v4 | |
| - name: "🔧 Prepare environment" | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '17' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: "🕸️ Populate matrix" | |
| id: set-matrix | |
| run: | | |
| ./gradlew generateMatrixBatchedCoordinates -Pbatches=16 | |
| test-all-metadata: | |
| if: github.repository == 'oracle/graalvm-reachability-metadata' | |
| name: "🧪 ${{ matrix.coordinates }} (GraalVM for JDK ${{ matrix.version }} @ ${{ matrix.os }})" | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 120 | |
| needs: get-all-metadata | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{fromJson(needs.get-all-metadata.outputs.matrix)}} | |
| steps: | |
| - name: "☁️ Checkout repository" | |
| uses: actions/checkout@v4 | |
| - name: "🔧 Setup java" | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: "🔧 Prepare environment" | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| set-java-home: 'false' | |
| java-version: ${{ matrix.version }} | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| native-image-job-reports: 'true' | |
| - name: "Pull allowed docker images" | |
| run: | | |
| ./gradlew pullAllowedDockerImages -Pcoordinates=${{ matrix.coordinates }} | |
| - name: "Disable docker networking" | |
| run: bash ./.github/workflows/disable-docker.sh | |
| - name: "🧪 Run '${{ matrix.coordinates }}' tests" | |
| run: | | |
| ./gradlew test -Pcoordinates=${{ matrix.coordinates }} | |
| all-metadata-passed: | |
| name: "🧪 All metadata tests have passed" | |
| runs-on: "ubuntu-22.04" | |
| timeout-minutes: 1 | |
| if: ${{ always() }} && github.repository == 'oracle/graalvm-reachability-metadata' | |
| needs: test-all-metadata | |
| steps: | |
| - name: "All tests passed" | |
| if: needs.test-all-metadata.result == 'success' | |
| run: exit 0 | |
| - name: "Some tests failed" | |
| if: needs.test-all-metadata.result == 'failure' | |
| run: exit 1 |