From 355b713c28b4d55c7317c7f5edf8d67c2e42cf0e Mon Sep 17 00:00:00 2001 From: Burke Davison <40617934+burkedavison@users.noreply.github.com> Date: Fri, 23 Jun 2023 19:19:01 +0000 Subject: [PATCH] ci: add showcase-clirr check (#1805) * ci: add showcase-clirr check * chore: eliminate showcase version assumption * chore: use target-branch showcase version for comparison --- .github/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fccf60117f..c3950bb73d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -207,6 +207,36 @@ jobs: -P enable-integration-tests \ --batch-mode \ --no-transfer-progress + + showcase-clirr: + if: ${{ github.base_ref != '' }} # Only execute on pull_request trigger event + runs-on: ubuntu-22.04 + steps: + - name: Checkout @ target branch + uses: actions/checkout@v3 + with: + ref: ${{ github.base_ref }} + - uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: temurin + cache: maven + - name: Install sdk-platform-java and showcase to local maven repository + run: | + mvn install -B -ntp -T 1C -DskipTests + cd showcase + mvn install -B -ntp -T 1C -DskipTests + SHOWCASE_CLIENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "SHOWCASE_CLIENT_VERSION=$SHOWCASE_CLIENT_VERSION" >> "$GITHUB_ENV" + - name: Checkout sdk-platform-java @ PR merge commit + uses: actions/checkout@v3 + # Showcase golden test ensures that src changes are already reflected in the PR. + - name: Clirr check + working-directory: showcase + run: | + mvn versions:set -B -ntp -DnewVersion=local + mvn clirr:check -B -ntp -Dclirr.skip=false -DcomparisonVersion=$SHOWCASE_CLIENT_VERSION + gapic-generator-java-bom: runs-on: ubuntu-latest steps: