github.com/koko1123/flow-go-1@v0.29.6/.github/workflows/test-monitor-flaky.yml (about)

     1  # This workflow runs ALL tests, including all tests that are skipped because they are flaky, as well as all the normal (non-skipped) tests.
     2  # This workflow is run less frequently because running flaky tests is problematic and causes errors.
     3  
     4  name: Test Monitor - Flaky
     5  
     6  on:
     7    schedule:
     8      - cron: '0 */12 * * *' # every 12 hours
     9    push:
    10      paths:
    11        - 'tools/test_monitor/**'
    12  
    13  env:
    14    BIGQUERY_DATASET: production_src_flow_test_metrics
    15    BIGQUERY_TABLE: test_results
    16    GO_VERSION: 1.19
    17  
    18  concurrency: 
    19    group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
    20    cancel-in-progress: true
    21  
    22  jobs:
    23    flaky-test-run:
    24      name: Test Monitor - Flaky Tests Run
    25      strategy:
    26        fail-fast: false
    27        matrix:
    28          test-category:
    29            - unit
    30            - unit-crypto
    31            - unit-insecure
    32            - unit-integration
    33            - integration-bft
    34            - integration-mvp
    35            - integration-ghost
    36            - integration-network
    37            - integration-epochs
    38            - integration-access
    39            - integration-collection
    40            - integration-consensus
    41            - integration-execution
    42            - integration-verification
    43      env:
    44        TEST_CATEGORY: ${{ matrix.test-category }}
    45        COMMIT_SHA: ${{ github.sha }}
    46        RUN_ID: ${{ github.run_id }}
    47        RESULTS_FILE: test-results
    48      runs-on: ubuntu-latest
    49      steps:
    50      - name: Get job run date
    51        id: job_run_date
    52        run: echo "::set-output name=date::$(TZ=":America/Los_Angeles" date -Iseconds)"
    53      - name: Set up Cloud SDK
    54        uses: google-github-actions/setup-gcloud@v0
    55        with:
    56          service_account_key: ${{ secrets.GCP_SA_KEY }}
    57      - name: Setup Go
    58        uses: actions/setup-go@v2
    59        with:
    60          go-version: ${{ env.GO_VERSION }}
    61      - name: Checkout repo
    62        uses: actions/checkout@v2
    63        with:
    64          ref: ${{ env.COMMIT_SHA }}
    65      - name: Get commit date
    66        id: commit_date
    67        run: echo "::set-output name=date::$(git show --no-patch --no-notes --pretty='%cI' $COMMIT_SHA)"
    68      - name: Run tests
    69        continue-on-error: true
    70        run: ./tools/test_monitor/run-tests.sh
    71        env:
    72          TEST_FLAKY: true
    73          JSON_OUTPUT: true
    74          RACE_DETECTOR: 1
    75      - name: Process test results
    76        run: cat test-output | go run tools/test_monitor/level1/process_summary1_results.go
    77        env:
    78          JOB_STARTED: ${{ steps.job_run_date.outputs.date }}
    79          COMMIT_DATE: ${{ steps.commit_date.outputs.date }}
    80      - name: Upload results to BigQuery
    81        uses: nick-fields/retry@v2
    82        with:
    83          timeout_minutes: 2
    84          max_attempts: 3
    85          command: bq load --source_format=NEWLINE_DELIMITED_JSON $BIGQUERY_DATASET.$BIGQUERY_TABLE $RESULTS_FILE tools/test_monitor/schemas/test_results_schema.json