Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 0 additions & 82 deletions .github/workflows/java-cloud-bom-bom-content-test.yaml

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/java-cloud-bom-ci-validate-bom.yaml

This file was deleted.

167 changes: 70 additions & 97 deletions .github/workflows/java-cloud-bom-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3

Check warning on line 37 in .github/workflows/java-cloud-bom-ci.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

ref-version-mismatch

java-cloud-bom-ci.yaml:37: action's hash pin has mismatched or missing version comment: points to commit 0e4a8c6effa4
id: filter
with:
filters: |
Expand All @@ -42,14 +42,13 @@
- 'java-cloud-bom/**'
- 'sdk-platform-java/**'
- 'google-auth-library-java/**'
units:
dependencies:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [11, 17, 21]
java: [17]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
Expand All @@ -60,135 +59,112 @@
java-version: ${{matrix.java}}
cache: 'maven'
- run: java -version
- name: Pre-install all BOM modules to populate local cache
run: bash java-cloud-bom/tests/pre-install.sh
shell: bash
- run: .kokoro/build.sh
env:
JOB_TYPE: test
GH_TOKEN: ${{ github.token }}
units-java8:
- name: Install modules locally
run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C
- run: .kokoro/dependencies.sh

bom-content-test:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
# Building using Java 17 and run the tests with Java 8 runtime
name: "units (8)"
if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
with:
java-version: 8
distribution: temurin
cache: 'maven'
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV
shell: bash
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
with:
java-version: 17
distribution: temurin
cache: 'maven'
- name: Pre-install all BOM modules to populate local cache
run: bash java-cloud-bom/tests/pre-install.sh
shell: bash
- run: .kokoro/build.sh
env:
JOB_TYPE: test
GH_TOKEN: ${{ github.token }}
windows:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: windows-latest
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
with:
distribution: temurin
java-version: 8
cache: 'maven'
java-version: 11
cache: maven
- run: java -version
- name: Pre-install all BOM modules to populate local cache
run: bash java-cloud-bom/tests/pre-install.sh
shell: bash
- run: .kokoro/build.sh
env:
JOB_TYPE: test
GH_TOKEN: ${{ github.token }}
dependencies:
- name: Install modules locally
run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C
- name: Install BOMs
run: |
mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests
- name: Ensure the members of the Libraries BOM exist in Maven Central
uses: ./java-cloud-bom/tests/validate-bom
with:
bom-path: java-cloud-bom/libraries-bom/pom.xml
- name: Ensure the BOM has valid content (at releases)
if: github.head_ref == 'release-please--branches--main'
run: |
mvn -B -V -ntp verify -Dtest="BomContentTest#testLibrariesBom"
working-directory: java-cloud-bom/tests

bom-assertion-test:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' }}
name: BomContentAssertionsTest (Test for assertion logic in BomContentTest)
runs-on: ubuntu-latest
strategy:
matrix:
java: [17]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
with:
distribution: temurin
java-version: ${{matrix.java}}
cache: 'maven'
distribution: zulu
java-version: 11
- run: java -version
- name: Pre-install all BOM modules to populate local cache
run: bash java-cloud-bom/tests/pre-install.sh
shell: bash
- run: .kokoro/dependencies.sh
javadoc:
- name: Install modules locally
run: mvn install -B -ntp -Pquick-build -DskipTests=true -T 1C
- name: Install BOMs
run: |
mvn -B -V -ntp install -f java-cloud-bom/pom.xml -DskipTests
- run: |
mvn -B -V -ntp verify -Dtest="BomContentAssertionsTest"
working-directory: java-cloud-bom/tests

test-invalid-bom:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
- name: Fetch the bad protobuf-bom version 3.22.1
shell: bash
# 3.22.1 had a issue in their pom.xml
# https://github.com/protocolbuffers/protobuf/issues/12170
run: |
mkdir -p bad-protobuf-bom
curl https://repo1.maven.org/maven2/com/google/protobuf/protobuf-bom/3.22.1/protobuf-bom-3.22.1.pom \
--output bad-protobuf-bom/pom.xml
- name: Check the bad BOM
uses: ./java-cloud-bom/tests/validate-bom
id: validate-bom
with:
distribution: temurin
java-version: 17
cache: 'maven'
- run: java -version
- name: Pre-install all BOM modules to populate local cache
run: bash java-cloud-bom/tests/pre-install.sh
bom-path: bad-protobuf-bom/pom.xml
continue-on-error: true
- name: Ensure the validate-bom invalidated the bad BOM
shell: bash
- run: .kokoro/build.sh
env:
JOB_TYPE: javadoc
lint:
if: steps.validate-bom.outcome != 'failure'
run: |
echo "The validate-bom check should have invalidated the bad BOM"
exit 1

dashboard:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0
with:
distribution: temurin
java-version: 11
cache: 'maven'
cache: maven
- run: java -version
- name: Pre-install all BOM modules to populate local cache
run: bash java-cloud-bom/tests/pre-install.sh
shell: bash
- run: .kokoro/build.sh
- run: .kokoro/dashboard.sh
env:
JOB_TYPE: lint
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
clirr:
JOB_TYPE: dashboard-units-check

shared-dependencies-convergence:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
if: ${{ needs.filter.outputs.library == 'true' && github.repository_owner == 'googleapis' && github.head_ref == 'release-please--branches--main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
Expand All @@ -198,12 +174,9 @@
with:
distribution: temurin
java-version: 11
cache: 'maven'
cache: maven
- run: java -version
- name: Pre-install all BOM modules to populate local cache
run: bash java-cloud-bom/tests/pre-install.sh
shell: bash
- run: .kokoro/build.sh
- run: .kokoro/dashboard.sh
env:
JOB_TYPE: clirr
BUILD_SUBDIR: java-cloud-bom
JOB_TYPE: dependency-convergence-check

Loading
Loading