From 24ce2280489c75d6651dce1fb9f4823a38648e39 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Tue, 7 May 2024 08:30:07 -0400 Subject: [PATCH] chore: add a configuration checker (#10761) * chore: add a configuration checker * format code * change config to test checker * Revert "change config to test checker" This reverts commit 51ad70a0bf5ccc6911b3626039542bb55169495b. * update image tag * change docker cmd * change command * change command * change command --- .github/workflows/ci.yaml | 41 +++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aa737fdcba34..31c68a66b306 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,13 +30,13 @@ jobs: - name: Get current week within the year id: date run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: ${{matrix.java}} - run: java -version - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: mvn-cache with: path: ~/.m2/repository @@ -50,8 +50,8 @@ jobs: steps: - name: Support longpaths run: git config --system core.longpaths true - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -67,13 +67,13 @@ jobs: - name: Get current week within the year id: date run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 - run: java -version - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: mvn-cache with: path: ~/.m2/repository @@ -87,8 +87,8 @@ jobs: - name: Get current week within the year id: date run: echo "::set-output name=week_of_year::$(date +'%W' --utc)" - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 @@ -102,8 +102,8 @@ jobs: gapic-libraries-bom: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: java-version: 11 distribution: temurin @@ -115,6 +115,23 @@ jobs: uses: googleapis/java-cloud-bom/tests/validate-bom@v26.13.0 with: bom-path: gapic-libraries-bom/pom.xml + generation-config-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: validate generation configuration + shell: bash + run: | + docker run \ + --rm \ + -u "$(id -u):$(id -g)" \ + -v "$(pwd):${workspace_name}" \ + --entrypoint python \ + gcr.io/cloud-devrel-public-resources/java-library-generation:"${library_generation_image_tag}" \ + /src/cli/entry_point.py validate-generation-config + env: + library_generation_image_tag: 2.40.0 + workspace_name: /workspace # TODO: Uncomment the needed Github Actions # dependencies: