Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/run-image-processing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: run-image-processing
on:
push:
branches:
- main
paths:
- 'run/image-processing/**'
pull_request:
paths:
- 'run/image-processing/**'
pull_request_target:
types: [labeled]
schedule:
- cron: '0 2 * * *'
jobs:
test:
if: ${{ github.event.action != 'labeled' || github.event.label.name == 'actions:force-run' }}
runs-on: ubuntu-latest
permissions:
contents: 'write'
pull-requests: 'write'
id-token: 'write'
steps:
- 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/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: actions/setup-node@v2
with:
node-version: 14
- run: npm install
working-directory: run/image-processing
- run: npm test
working-directory: run/image-processing
env:
MOCHA_REPORTER_SUITENAME: run_image_processing
MOCHA_REPORTER_OUTPUT: run_image_processing_sponge_log.xml
MOCHA_REPORTER: xunit
- if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
uses: actions/github-script@v5
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}}
3 changes: 2 additions & 1 deletion .github/workflows/workflows.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"monitoring/opencensus",
"monitoring/prometheus",
"datacatalog/cloud-client",
"datacatalog/quickstart"
"datacatalog/quickstart",
"run/image-processing"
]
7 changes: 0 additions & 7 deletions .kokoro/run/image-processing.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion run/image-processing/test/system.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.

const assert = require('assert');
const got = require('got');
const {execSync} = require('child_process');
const got = require('got');
const {GoogleAuth} = require('google-auth-library');
const auth = new GoogleAuth();

Expand Down