|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: |
| 4 | + - main |
| 5 | + pull_request: |
| 6 | +name: java-cloud-bom ci |
| 7 | +env: |
| 8 | + BUILD_SUBDIR: java-cloud-bom |
| 9 | +jobs: |
| 10 | + filter: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + outputs: |
| 13 | + library: ${{ steps.filter.outputs.library }} |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + - uses: dorny/paths-filter@v3 |
| 17 | + id: filter |
| 18 | + with: |
| 19 | + filters: | |
| 20 | + library: |
| 21 | + - 'java-cloud-bom/**' |
| 22 | + - 'sdk-platform-java/**' |
| 23 | + - 'google-auth-library-java/**' |
| 24 | + bom-content-test: |
| 25 | + needs: filter |
| 26 | + if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' }} |
| 27 | + runs-on: ubuntu-latest |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + - uses: actions/setup-java@v5 |
| 31 | + with: |
| 32 | + distribution: temurin |
| 33 | + java-version: 11 |
| 34 | + cache: maven |
| 35 | + - run: java -version |
| 36 | + - name: Pre-install all BOM modules to populate local cache |
| 37 | + run: bash java-cloud-bom/tests/pre-install.sh |
| 38 | + shell: bash |
| 39 | + - name: Install BOMs |
| 40 | + run: | |
| 41 | + mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests |
| 42 | + - name: Ensure the members of the Libraries BOM exist in Maven Central |
| 43 | + uses: ./java-cloud-bom/tests/validate-bom |
| 44 | + with: |
| 45 | + bom-path: java-cloud-bom/libraries-bom/pom.xml |
| 46 | + - name: Ensure the BOM has valid content (at releases) |
| 47 | + if: github.head_ref == 'release-please--branches--main' |
| 48 | + run: | |
| 49 | + mvn -B -V -ntp verify -Dtest="BomContentTest#testLibrariesBom" |
| 50 | + working-directory: java-cloud-bom/tests |
| 51 | + |
| 52 | + bom-assertion-test: |
| 53 | + needs: filter |
| 54 | + if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' }} |
| 55 | + name: BomContentAssertionsTest (Test for assertion logic in BomContentTest) |
| 56 | + runs-on: ubuntu-latest |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v4 |
| 59 | + - uses: actions/setup-java@v5 |
| 60 | + with: |
| 61 | + distribution: zulu |
| 62 | + java-version: 11 |
| 63 | + - run: java -version |
| 64 | + - name: Pre-install all BOM modules to populate local cache |
| 65 | + run: bash java-cloud-bom/tests/pre-install.sh |
| 66 | + shell: bash |
| 67 | + - name: Install BOMs |
| 68 | + run: | |
| 69 | + mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests |
| 70 | + - run: | |
| 71 | + mvn -B -V -ntp verify -Dtest="BomContentAssertionsTest" |
| 72 | + working-directory: java-cloud-bom/tests |
| 73 | +
|
0 commit comments