Skip to content

Commit

Permalink
Merge branch 'main' into nodejs-asset-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrarmonsur authored Nov 17, 2022
2 parents 96531f0 + 93e5ef3 commit 430d47d
Show file tree
Hide file tree
Showing 98 changed files with 6,897 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cloud-tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
branches:
- main
paths:
- 'cloud-tasks/snippets/*.js'
- 'cloud-tasks/snippets/**'
pull_request:
paths:
- 'cloud-tasks/snippets/*.js'
- 'cloud-tasks/snippets/**'
pull_request_target:
types: [labeled]
schedule:
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/speech.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: speech
on:
push:
branches:
- main
paths:
- 'speech/**'
pull_request:
paths:
- 'speech/**'
pull_request_target:
types: [labeled]
schedule:
- cron: '0 0 * * 0'
jobs:
test:
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'actions:force-run' }}
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: 'write'
pull-requests: 'write'
id-token: 'write'
steps:
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: google-github-actions/[email protected]
with:
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
service_account: '[email protected]'
create_credentials_file: 'true'
access_token_lifetime: 600s
- uses: actions/setup-node@v3
with:
node-version: 14
- run: npm install
working-directory: speech
- run: npm test
working-directory: speech
env:
MOCHA_REPORTER_SUITENAME: speech
MOCHA_REPORTER_OUTPUT: speech_sponge_log.xml
MOCHA_REPORTER: xunit
- if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
name: 'actions:force-run',
owner: 'GoogleCloudPlatform',
repo: 'nodejs-docs-samples',
issue_number: context.payload.pull_request.number
});
} catch (e) {
if (!e.message.includes('Label does not exist')) {
throw e;
}
}
- if: ${{ github.event_name == 'schedule' && always() }}
run: |
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
chmod +x ./flakybot
./flakybot --repo GoogleCloudPlatform/nodejs-docs-samples --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
67 changes: 67 additions & 0 deletions .github/workflows/translate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: translate
on:
push:
branches:
- main
paths:
- 'translate/**'
pull_request:
paths:
- 'translate/**'
pull_request_target:
types: [labeled]
schedule:
- cron: '0 0 * * 0'
jobs:
test:
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'actions:force-run' }}
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: 'write'
pull-requests: 'write'
id-token: 'write'
steps:
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: google-github-actions/[email protected]
with:
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
service_account: '[email protected]'
create_credentials_file: 'true'
access_token_lifetime: 600s
- uses: actions/setup-node@v3
with:
node-version: 14
- run: npm install
working-directory: translate
- run: npm test
working-directory: translate
env:
MOCHA_REPORTER_SUITENAME: translate
MOCHA_REPORTER_OUTPUT: translate_sponge_log.xml
MOCHA_REPORTER: xunit
- if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
await github.rest.issues.removeLabel({
name: 'actions:force-run',
owner: 'GoogleCloudPlatform',
repo: 'nodejs-docs-samples',
issue_number: context.payload.pull_request.number
});
} catch (e) {
if (!e.message.includes('Label does not exist')) {
throw e;
}
}
- if: ${{ github.event_name == 'schedule' && always() }}
run: |
curl https://github.com/googleapis/repo-automation-bots/releases/download/flakybot-1.1.0/flakybot -o flakybot -s -L
chmod +x ./flakybot
./flakybot --repo GoogleCloudPlatform/nodejs-docs-samples --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
4 changes: 3 additions & 1 deletion .github/workflows/workflows.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@
"datacatalog/cloud-client",
"datacatalog/quickstart",
"datastore/functions",
"scheduler",
"service-directory/snippets",
"scheduler",
"speech",
"talent",
"translate",
"video-intelligence",
"contact-center-insights",
"workflows"
Expand Down
25 changes: 0 additions & 25 deletions profiler/package.json

This file was deleted.

4 changes: 4 additions & 0 deletions speech/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
rules:
no-console: off
node/no-unsupported-features/node-builtins: off
Loading

0 comments on commit 430d47d

Please sign in to comment.