diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index accde8ce..b46e4c4d 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -1,40 +1,23 @@ -# Whether or not rebase-merging is enabled on this repository. -# Defaults to `true` -rebaseMergeAllowed: false - -# Whether or not squash-merging is enabled on this repository. -# Defaults to `true` -squashMergeAllowed: true - -# Whether or not PRs are merged with a merge commit on this repository. -# Defaults to `false` -mergeCommitAllowed: false - -# Rules for main branch protection branchProtectionRules: -# Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `main` -- pattern: main - # Can admins overwrite branch protection. - # Defaults to `true` - isAdminEnforced: true - # Number of approving reviews required to update matching branches. - # Defaults to `1` - requiredApprovingReviewCount: 1 - # Are reviews from code owners required to update matching branches. - # Defaults to `false` - requiresCodeOwnerReviews: true - # Require up to date branches - requiresStrictStatusChecks: true - # List of required status check contexts that must pass for commits to be accepted to matching branches. - requiredStatusCheckContexts: - - "Kokoro integration test" - - "ci/kokoro: Samples test" - - "ci/kokoro: System test" - - "cla/google" - - "docs" - - "lint" - - "test (14)" - - "test (16)" - - "test (18)" - - "system-test" + - pattern: main + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: true + requiredStatusCheckContexts: + - "ci/kokoro: Samples test" + - "ci/kokoro: System test" + - lint + - test (14) + - test (16) + - test (18) + - cla/google + - windows + - OwlBot Post Processor +permissionRules: + - team: yoshi-admins + permission: admin + - team: jsteam-admins + permission: admin + - team: jsteam + permission: push diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9e1ea26b..4892eb2c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,10 +1,3 @@ -# This file is manually updated due to specific needs of the cloud -# profiler agent, e.g., not supporting Windows. -# -# It should be in sync with Google's template -# https://github.com/googleapis/synthtool/blob/master/synthtool/gcp/templates/node_library/.github/workflows/ci.yaml -# for Node.js GCP libraries as much as possible. - on: push: branches: @@ -18,8 +11,8 @@ jobs: matrix: node: [14, 16, 18, 20] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - run: node --version @@ -29,28 +22,39 @@ jobs: - run: npm install --production --engine-strict --ignore-scripts --no-package-lock # Clean up the production install, before installing dev/production: - run: rm -rf node_modules - - run: npm install + - run: npm install --engine-strict + - run: npm test + env: + MOCHA_THROW_DEPRECATION: false + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 14 + - run: npm install --engine-strict - run: npm test env: MOCHA_THROW_DEPRECATION: false lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 14 - run: npm install - run: npm run lint - # docs: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - # - uses: actions/setup-node@v4 - # with: - # node-version: 14 - # - run: npm install - # - run: npm run docs - # - uses: JustinBeckwith/linkinator-action@v1 - # with: - # paths: docs/ + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 14 + - run: npm install + - run: npm run docs + - uses: JustinBeckwith/linkinator-action@v1 + with: + paths: docs/ diff --git a/owlbot.py b/owlbot.py index 261c23ac..1c861d61 100644 --- a/owlbot.py +++ b/owlbot.py @@ -16,3 +16,20 @@ node.owlbot_main(templates_excludes=[".github/sync-repo-settings.yaml", ".github/workflows/ci.yaml"]) +# 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 +# +# https://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. +import synthtool.languages.node as node +node.owlbot_main(templates_excludes=[ +'README.md' +])