github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/.github/workflows/actions/test-monitor-process-results/action.yml (about)

     1  name: Test Monitor - Process Results
     2  
     3  description: Custom action that's used in multiple Flaky Test Monitor jobs to process test results and upload them to BigQuery
     4  
     5  inputs:
     6    gcp_sa_key:
     7      description: 'The GCP service account key for uploading to BigQuery'
     8      required: true
     9  
    10  runs:
    11    using : "composite"
    12    steps:
    13      - name: Get commit date
    14        id: commit_date
    15        run: echo "::set-output name=date::$(git show --no-patch --no-notes --pretty='%cI' $COMMIT_SHA)"
    16        shell: bash
    17      - name: Get job run date
    18        id: job_run_date
    19        run: echo "::set-output name=date::$(TZ=":UTC" date -Iseconds)"
    20        shell: bash
    21      - name: Process test results
    22        run: cat test-output | go run tools/test_monitor/level1/process_summary1_results.go
    23        env:
    24          JOB_STARTED: ${{ steps.job_run_date.outputs.date }}
    25          COMMIT_DATE: ${{ steps.commit_date.outputs.date }}
    26        shell: bash
    27      - name: Set up Cloud SDK
    28        uses: google-github-actions/setup-gcloud@v0
    29        with:
    30          service_account_key: ${{ inputs.gcp_sa_key }}
    31      - name: Upload results to BigQuery (skipped tests)
    32        uses: nick-fields/retry@v2
    33        with:
    34          timeout_minutes: 1
    35          max_attempts: 3
    36          command: bq load --source_format=NEWLINE_DELIMITED_JSON $BIGQUERY_DATASET.$BIGQUERY_TABLE $SKIPPED_TESTS_FILE tools/test_monitor/schemas/skipped_tests_schema.json
    37      - name: Upload results to BigQuery (test run)
    38        uses: nick-fields/retry@v2
    39        with:
    40          timeout_minutes: 2
    41          max_attempts: 3
    42          command: bq load --source_format=NEWLINE_DELIMITED_JSON $BIGQUERY_DATASET.$BIGQUERY_TABLE2 $RESULTS_FILE tools/test_monitor/schemas/test_results_schema.json