Skip to content

Commit

Permalink
Merge branch 'main' into nodejs-monitoring-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrarmonsur authored Nov 9, 2022
2 parents a5b6e60 + e35f9de commit 84d376c
Show file tree
Hide file tree
Showing 32 changed files with 1,695 additions and 235 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
Expand All @@ -17,12 +17,12 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: JustinBeckwith/linkinator-action@v1
with:
paths: "**/*.md"
region-tags:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: ./.github/workflows/region-tags-tests.sh
67 changes: 0 additions & 67 deletions .github/workflows/orgpolicy.yaml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/talent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: talent
on:
push:
branches:
- main
paths:
- 'talent/**'
pull_request:
paths:
- 'talent/**'
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.1.0
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: 'google-github-actions/auth@v0.8.3'
with:
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
service_account: 'kokoro-system-test@long-door-651.iam.gserviceaccount.com'
create_credentials_file: 'true'
access_token_lifetime: 600s
- uses: actions/setup-node@v3.5.1
with:
node-version: 16
- run: npm install
working-directory: talent
- run: npm test
working-directory: talent
env:
MOCHA_REPORTER_SUITENAME: talent
MOCHA_REPORTER_OUTPUT: talent_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'}}
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: 2 additions & 2 deletions .github/workflows/workflows.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"monitoring/opencensus",
"monitoring/prometheus",
"monitoring/snippets",
"orgpolicy",
"datacatalog/cloud-client",
"datacatalog/quickstart",
"datastore/functions"
"datastore/functions",
"talent"
]
48 changes: 0 additions & 48 deletions orgpolicy/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions orgpolicy/package.json

This file was deleted.

49 changes: 0 additions & 49 deletions orgpolicy/quickstart.js

This file was deleted.

43 changes: 0 additions & 43 deletions orgpolicy/test/quickstart.js

This file was deleted.

3 changes: 3 additions & 0 deletions talent/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rules:
no-console: off
30 changes: 30 additions & 0 deletions talent/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "@google-cloud/talent-samples",
"description": "Samples for the Cloud Talent Solution client library for Node.js",
"license": "Apache-2.0",
"author": "Google LLC",
"engines": {
"node": ">=12.0.0"
},
"repository": "googleapis/nodejs-talent",
"private": true,
"files": [
"*.js"
],
"scripts": {
"test": "mocha --timeout 600000",
"lint": "eslint src --ext .ts",
"lint:fix": "npm run lint -- --fix"
},
"dependencies": {
"@google-cloud/talent": "^5.0.0",
"uuid": "^9.0.0",
"yargs": "^16.0.3"
},
"devDependencies": {
"@types/mocha": "^9.0.0",
"@types/node": "^16.0.0",
"chai": "^4.2.0",
"mocha": "^8.1.3"
}
}
13 changes: 13 additions & 0 deletions talent/quickstart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright 2019 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.
Loading

0 comments on commit 84d376c

Please sign in to comment.