forked from onflow/flow-go
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
55 lines (47 loc) · 1.92 KB
/
Copy pathaction.yml
File metadata and controls
55 lines (47 loc) · 1.92 KB
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
name: Test Monitor - Process Results
description: Custom action that's used in multiple Flaky Test Monitor jobs to process test results and upload them to BigQuery
inputs:
service_account:
description: 'The GCP Service Account'
required: true
workload_identity_provider:
description: 'The GCP Workload Identity Provider'
required: true
runs:
using : "composite"
steps:
- name: Get commit date
id: commit_date
run: echo "::set-output name=date::$(git show --no-patch --no-notes --pretty='%cI' $COMMIT_SHA)"
shell: bash
- name: Get job run date
id: job_run_date
run: echo "::set-output name=date::$(TZ=":UTC" date -Iseconds)"
shell: bash
- name: Process test results
run: cat test-output | go run tools/test_monitor/level1/process_summary1_results.go
env:
JOB_STARTED: ${{ steps.job_run_date.outputs.date }}
COMMIT_DATE: ${{ steps.commit_date.outputs.date }}
shell: bash
- name: Google auth
id: auth
uses: google-github-actions/auth@v2
with:
service_account: ${{ inputs.service_account }}
token_format: 'access_token'
workload_identity_provider: ${{ inputs.workload_identity_provider }}
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
- name: Upload results to BigQuery (skipped tests)
uses: nick-fields/retry@v4
with:
timeout_minutes: 1
max_attempts: 3
command: bq load --source_format=NEWLINE_DELIMITED_JSON $BIGQUERY_DATASET.$BIGQUERY_TABLE $SKIPPED_TESTS_FILE tools/test_monitor/schemas/skipped_tests_schema.json
- name: Upload results to BigQuery (test run)
uses: nick-fields/retry@v4
with:
timeout_minutes: 2
max_attempts: 3
command: bq load --source_format=NEWLINE_DELIMITED_JSON $BIGQUERY_DATASET.$BIGQUERY_TABLE2 $RESULTS_FILE tools/test_monitor/schemas/test_results_schema.json