Skip to content

Commit

Permalink
Merge pull request #4694 from onflow/yurii/sync-master-to-dynamic-pro…
Browse files Browse the repository at this point in the history
…tocol-state
  • Loading branch information
durkmurder authored Sep 7, 2023
2 parents 8151d19 + 4c0dd75 commit 17c66b8
Show file tree
Hide file tree
Showing 356 changed files with 14,726 additions and 9,107 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/actions/test-monitor-process-results/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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:
gcp_sa_key:
description: 'The GCP service account key for uploading to BigQuery'
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: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ inputs.gcp_sa_key }}
- name: Upload results to BigQuery (skipped tests)
uses: nick-fields/retry@v2
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@v2
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
6 changes: 6 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- name: Print all input variables
run: echo '${{ toJson(inputs) }}' | jq

- id: generate
run: |
roles=()
Expand All @@ -74,6 +77,7 @@ jobs:
fi
rolesJSON=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${roles[@]}")
echo "matrix={\"role\":$(echo $rolesJSON)}" >> $GITHUB_OUTPUT
docker-push:
name: ${{ matrix.role }} images
runs-on: ubuntu-latest
Expand All @@ -89,10 +93,12 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: '1.19'

- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ inputs.tag }}

# Provide Google Service Account credentials to Github Action, allowing interaction with the Google Container Registry
# Logging in as github-actions@dl-flow.iam.gserviceaccount.com
- name: Docker login
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ on:
- 'auto-cadence-upgrade/**'
- 'feature/**'
- 'v[0-9]+.[0-9]+'
merge_group:
branches:
- master

env:
GO_VERSION: "1.20"

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

Expand Down Expand Up @@ -96,7 +99,7 @@ jobs:
cache: true
- name: Set Test Matrix
id: set-test-matrix
run: go run utils/test_matrix/test_matrix.go access admin cmd consensus engine fvm ledger module network utils
run: go run utils/test_matrix/test_matrix.go admin cmd consensus engine fvm ledger module network/test network/p2p utils

unit-test:
name: Unit Tests (${{ matrix.targets.name }})
Expand All @@ -115,7 +118,7 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Setup tests (${{ matrix.targets.name }}
- name: Setup tests (${{ matrix.targets.name }})
run: VERBOSE=1 make -e GO_TEST_PACKAGES="${{ matrix.targets.packages }}" install-tools
- name: Run tests (${{ matrix.targets.name }})
uses: nick-fields/retry@v2
Expand Down Expand Up @@ -189,10 +192,13 @@ jobs:
matrix:
make:
- make -C integration access-tests
- make -C integration bft-tests
- make -C integration bft-framework-tests
- make -C integration bft-protocol-tests
- make -C integration bft-gossipsub-tests
- make -C integration collection-tests
- make -C integration consensus-tests
- make -C integration epochs-tests
- make -C integration epochs-cohort1-tests
- make -C integration epochs-cohort2-tests
- make -C integration execution-tests
- make -C integration ghost-tests
- make -C integration mvp-tests
Expand All @@ -203,6 +209,9 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
# all tags are needed for integration tests
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
Expand Down
225 changes: 0 additions & 225 deletions .github/workflows/flaky-test-debug.yml

This file was deleted.

Loading

0 comments on commit 17c66b8

Please sign in to comment.