-
Notifications
You must be signed in to change notification settings - Fork 1.9k
58 lines (58 loc) · 2.09 KB
/
healthcare-hl7v2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: healthcare-hl7v2
on:
push:
branches:
- main
paths:
- 'healthcare/hl7v2/**'
pull_request:
paths:
- 'healthcare/hl7v2/**'
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: 'read'
id-token: 'write'
steps:
- uses: 'google-github-actions/auth@v0.3.1'
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/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: healthcare/hl7v2
- run: npm test
working-directory: healthcare/hl7v2
env:
MOCHA_REPORTER_SUITENAME: healthcare_hl7v2
MOCHA_REPORTER_OUTPUT: healthcare_hl7v2_sponge_log.xml
MOCHA_REPORTER: xunit
- if: ${{ github.event.action == 'labeled' && github.event.label.name == 'actions:force-run' }}
uses: actions/github-script@v2
with:
script: |
await github.rest.issues.removeLabel({
name: 'actions:force-run',
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number
});
- 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}}