From f4dd20fbaf7632c14c9ffc87c0709d12a3b4643a Mon Sep 17 00:00:00 2001 From: Timur Sadykov Date: Wed, 9 Nov 2022 16:06:29 -0800 Subject: [PATCH] ci: configure the protected branch (#1078) --- .github/workflows/ci.yaml | 121 +++++++------- .github/workflows/downstream.yaml | 267 +++++++++++++++--------------- 2 files changed, 191 insertions(+), 197 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e3bb26e37..ae2abf24c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,23 +1,8 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: +'on': push: branches: - - main - pull_request: + - 1.12.x + pull_request: null name: ci jobs: units: @@ -25,65 +10,71 @@ jobs: strategy: fail-fast: false matrix: - java: [8, 11, 17] + java: + - 8 + - 11 + - 17 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: test + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test windows: runs-on: windows-latest steps: - - name: Support longpaths - run: git config --system core.longpaths true - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 8 - - run: java -version - - run: .kokoro/build.bat - env: - JOB_TYPE: test + - name: Support longpaths + run: git config --system core.longpaths true + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 8 + - run: java -version + - run: .kokoro/build.bat + env: + JOB_TYPE: test dependencies: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11, 17] + java: + - 8 + - 11 + - 17 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/dependencies.sh + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/dependencies.sh lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 11 - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: lint + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 11 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: lint clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 8 - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: clirr + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: clirr diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml index 6985f0ed4..93b257c46 100644 --- a/.github/workflows/downstream.yaml +++ b/.github/workflows/downstream.yaml @@ -1,8 +1,9 @@ -on: +'on': pull_request: - types: [ labeled ] + types: + - labeled branches: - - main + - 1.12.x name: downstream jobs: dependencies: @@ -11,134 +12,136 @@ jobs: strategy: fail-fast: false matrix: - java: [17] + java: + - 17 repo: - # This list needs to be updated manually until an automated solution is in place. - - accessapproval - - accesscontextmanager - - aiplatform - - analytics-admin - - analytics-data - - api-gateway - - apigee-connect - - appengine-admin - - area120-tables - - artifact-registry - - asset - - assured-workloads - - automl - - bigquery - - bigqueryconnection - - bigquerydatatransfer - - bigquerymigration - - bigqueryreservation - - bigtable - - billing - - billingbudgets - - binary-authorization - - channel - - cloudbuild - - compute - - contact-center-insights - - container - - containeranalysis - - data-fusion - - datacatalog - - dataflow - - datalabeling - - dataproc - - dataproc-metastore - - datastore - - datastream - - debugger-client - - deploy - - dialogflow - - dialogflow-cx - - dlp - - dms - - dns - - document-ai - - domains - - errorreporting - - essential-contacts - - eventarc - - filestore - - firestore - - functions - - game-servers - - gke-connect-gateway - - gkehub - - gsuite-addons - - iam-admin - - iamcredentials - - iot - - kms - - language - - life-sciences - - logging - - logging-logback - - managed-identities - - mediatranslation - - memcache - - monitoring - - monitoring-dashboards - - network-management - - network-security - - networkconnectivity - - notebooks - - orchestration-airflow - - orgpolicy - - os-config - - os-login - - phishingprotection - - policy-troubleshooter - - private-catalog - - profiler - - pubsublite - - recaptchaenterprise - - recommendations-ai - - recommender - - redis - - resource-settings - - resourcemanager - - retail - - scheduler - - secretmanager - - security-private-ca - - securitycenter - - securitycenter-settings - - service-control - - service-management - - service-usage - - servicedirectory - - shell - - spanner - - spanner-jdbc - - speech - - storage - - storage-nio - - storage-transfer - - talent - - tasks - - texttospeech - - tpu - - trace - - translate - - video-intelligence - - video-transcoder - - vision - - vpcaccess - - webrisk - - websecurityscanner - - workflow-executions - - workflows + - accessapproval + - accesscontextmanager + - aiplatform + - analytics-admin + - analytics-data + - api-gateway + - apigee-connect + - appengine-admin + - area120-tables + - artifact-registry + - asset + - assured-workloads + - automl + - bigquery + - bigqueryconnection + - bigquerydatatransfer + - bigquerymigration + - bigqueryreservation + - bigtable + - billing + - billingbudgets + - binary-authorization + - channel + - cloudbuild + - compute + - contact-center-insights + - container + - containeranalysis + - data-fusion + - datacatalog + - dataflow + - datalabeling + - dataproc + - dataproc-metastore + - datastore + - datastream + - debugger-client + - deploy + - dialogflow + - dialogflow-cx + - dlp + - dms + - dns + - document-ai + - domains + - errorreporting + - essential-contacts + - eventarc + - filestore + - firestore + - functions + - game-servers + - gke-connect-gateway + - gkehub + - gsuite-addons + - iam-admin + - iamcredentials + - iot + - kms + - language + - life-sciences + - logging + - logging-logback + - managed-identities + - mediatranslation + - memcache + - monitoring + - monitoring-dashboards + - network-management + - network-security + - networkconnectivity + - notebooks + - orchestration-airflow + - orgpolicy + - os-config + - os-login + - phishingprotection + - policy-troubleshooter + - private-catalog + - profiler + - pubsublite + - recaptchaenterprise + - recommendations-ai + - recommender + - redis + - resource-settings + - resourcemanager + - retail + - scheduler + - secretmanager + - security-private-ca + - securitycenter + - securitycenter-settings + - service-control + - service-management + - service-usage + - servicedirectory + - shell + - spanner + - spanner-jdbc + - speech + - storage + - storage-nio + - storage-transfer + - talent + - tasks + - texttospeech + - tpu + - trace + - translate + - video-intelligence + - video-transcoder + - vision + - vpcaccess + - webrisk + - websecurityscanner + - workflow-executions + - workflows steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: ${{matrix.java}} - - run: java -version - - run: sudo apt-get update -y - - run: sudo apt-get install libxml2-utils - - run: .kokoro/downstream-client-library-check.sh google-auth-library-bom ${{matrix.repo}} + - uses: actions/checkout@v2 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: ${{matrix.java}} + - run: java -version + - run: sudo apt-get update -y + - run: sudo apt-get install libxml2-utils + - run: >- + .kokoro/downstream-client-library-check.sh google-auth-library-bom + ${{matrix.repo}}