From 282b1b35f74218bc8e66cf32c1a1d5be08d9dc40 Mon Sep 17 00:00:00 2001 From: googlemaps-bot Date: Mon, 6 Jun 2022 14:04:14 +0000 Subject: [PATCH] chore: Synced local '.github/' with remote 'sync-files/js/.github/' --- .github/CODEOWNERS | 8 -------- .github/workflows/codeql.yml | 19 ++++++++++++++---- .github/workflows/docs.yml | 38 +++++++++++++++++++++++++++++++++++ .github/workflows/package.yml | 30 +++++++++++++++++++++++++++ .github/workflows/release.yml | 8 ++++---- .github/workflows/test.yml | 19 +++++++++++------- 6 files changed, 99 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/package.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8c59384..c905124 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -14,12 +14,4 @@ # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners -# Specific to the repository - -# GitHub specific processes .github/ @googlemaps/admin - -# Developer experience related -LICENSE @googlemaps/admin -SECURITY.md @googlemaps/admin -CONTRIBUTING.md @googlemaps/admin diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 9bac14f..b2ed472 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ # 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. + # For most projects, this workflow file will not need changing; you simply need # to commit it to your repository. # @@ -23,6 +24,7 @@ # supported CodeQL languages. # name: "CodeQL" + on: push: branches: [main] @@ -31,6 +33,7 @@ on: branches: [main] schedule: - cron: "0 13 * * *" + jobs: analyze: name: Analyze @@ -39,6 +42,7 @@ jobs: actions: read contents: read security-events: write + strategy: fail-fast: false matrix: @@ -46,9 +50,11 @@ jobs: # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more: # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + steps: - name: Checkout repository uses: actions/checkout@v2 + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1 @@ -58,17 +64,22 @@ jobs: # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v1 - # Command-line programs to run using the OS shell. - # https://git.io/JvXDl - # If the Autobuild fails above, remove it and uncomment the following three lines + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language + #- run: | # make bootstrap # make release + - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..dbf4f99 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,38 @@ +# Copyright 2021 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. + +name: Docs +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - run: | + npm i + npm run docs + - uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs + user_name: 'googlemaps-bot' + user_email: 'googlemaps-bot@users.noreply.github.com' + commit_message: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 0000000..c5cd396 --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,30 @@ +# Copyright 2021 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. + +name: Package +on: + - push + - pull_request +jobs: + package: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm i + - uses: jpoehnelt/verify-npm-files-action@main + with: + keys: | + types + main + module diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c7c3c6..ab37983 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,6 +11,7 @@ # 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. + name: Release on: push: @@ -23,7 +24,7 @@ jobs: steps: - uses: actions/setup-node@v2 with: - node-version: "14" + node-version: '14' - name: Checkout uses: actions/checkout@v3 with: @@ -36,13 +37,12 @@ jobs: ${{ runner.os }}-node- - name: Test run: | - npm ci + npm i npm run lint npm test - name: Release uses: cycjimmy/semantic-release-action@v2 with: - # TODO consider using https://github.com/google/semantic-release-replace-plugin extra_plugins: | @semantic-release/commit-analyzer semantic-release-interval diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3223a6..141812e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -# Copyright 2022 Google LLC +# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,16 +11,21 @@ # 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. + name: Test on: [push, pull_request] jobs: test: runs-on: ubuntu-latest - steps: + steps: - uses: actions/checkout@v2 - - name: Test - run: | - npm ci - npm run lint - npm test + - uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - run: npm i + - run: npm run lint + - run: npm test - uses: codecov/codecov-action@v1