Skip to content

Commit

Permalink
Merge branch 'develop' into feat/block-history-est
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed May 24, 2024
2 parents 39b14f7 + bd0c027 commit 76e322c
Show file tree
Hide file tree
Showing 69 changed files with 1,981 additions and 1,739 deletions.
29 changes: 29 additions & 0 deletions .github/actions/build-gauntlet/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Install gauntlet dependencies
description: A GitHub Action to get tool versions and build Gauntlet

runs:
using: 'composite'
steps:
- name: Checkout Repository
uses: actions/[email protected]

- name: Get Tool Versions
uses: smartcontractkit/[email protected]
id: tool-versions

- name: Setup Node ${{ steps.tool-versions.outputs.nodejs_version }}
uses: actions/[email protected]
with:
node-version: ${{ steps.tool-versions.outputs.nodejs_version }}

- name: Install Dependencies
run: yarn --cwd ./gauntlet install --frozen-lockfile
shell: bash

- name: Build Gauntlet
run: yarn --cwd ./gauntlet build
shell: bash

- name: Run Gauntlet
run: yarn --cwd ./gauntlet gauntlet
shell: bash
8 changes: 4 additions & 4 deletions .github/actions/build-test-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
steps:
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
repository: chainlink-solana-tests
tag: ${{ inputs.tag }}
Expand All @@ -41,14 +41,14 @@ runs:
path: ${{ inputs.artifacts_path }}
- name: Get CTF Version
id: version
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/mod-version@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
go-project-path: ./integration-tests
module-name: github.com/smartcontractkit/chainlink-testing-framework
enforce-semantic-tag: false
- name: Build and Publish Test Runner
if: steps.check-image.outputs.exists == 'false'
uses: smartcontractkit/chainlink-github-actions/docker/build-push@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/docker/build-push@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
tags: |
${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ inputs.tag }}
Expand All @@ -57,7 +57,7 @@ runs:
build-args: |
BASE_IMAGE=${{ inputs.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ inputs.QA_AWS_REGION }}.amazonaws.com/test-base-image
IMAGE_VERSION=${{ steps.version.outputs.version }}
SUITES="soak smoke"
SUITES="smoke"
AWS_REGION: ${{ inputs.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ inputs.QA_AWS_ROLE_TO_ASSUME }}
- name: Print Image Built
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ jobs:
fi
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
repository: chainlink
tag: solana.${{ env.CUSTOM_CORE_REF || github.event.inputs.cl_branch_ref || github.sha }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
- name: Build Image
if: steps.check-image.outputs.exists == 'false'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
should_checkout: true
cl_repo: smartcontractkit/chainlink
Expand All @@ -122,22 +122,19 @@ jobs:
env:
TEST_SUITE: smoke
TEST_ARGS: -test.timeout 30m
CHAINLINK_COMMIT_SHA: ${{ github.sha }}
CHAINLINK_ENV_USER: ${{ github.actor }}
TEST_LOG_LEVEL: debug
SELECTED_NETWORKS: SIMULATED
INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: e2e_custom_run_smoke_tests
id: solana-e2e-smoke
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: E2E Custom Run Smoke Tests
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
continue-on-error: true
- name: Get core ref from PR body
if: github.event_name == 'pull_request'
Expand All @@ -150,19 +147,19 @@ jobs:
fi
- name: Checkout the repo
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Download Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: artifacts
path: ${{ env.CONTRACT_ARTIFACTS_PATH }}
- name: Install Solana CLI # required for ensuring the local test validator is configured correctly
run: ./scripts/install-solana-ci.sh
- name: Install gauntlet
uses: ./.github/actions/build-gauntlet
- name: Generate config overrides
run: | # https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md
cat << EOF > config.toml
[ChainlinkImage]
image="${{ env.CL_ECR }}"
version="solana.${{ env.CUSTOM_CORE_REF || github.event.inputs.cl_branch_ref || github.sha }}"
[Common]
user="${{ github.actor }}"
internal_docker_repo = "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com"
EOF
# shellcheck disable=SC2002
Expand All @@ -172,10 +169,11 @@ jobs:
# shellcheck disable=SC2086
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
test_command_to_run: cd ./integration-tests && go test -timeout 24h -count=1 -run TestSolanaOCRV2Smoke -json $(args) ./smoke 2>&1 | tee /tmp/gotest.log | gotestfmt
test_command_to_run: cd ./integration-tests && go test -timeout 24h -count=1 -run TestSolanaOCRV2Smoke -json $(args) ./smoke 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage
test_download_vendor_packages_command: cd ./integration-tests && go mod download
download_contract_artifacts_path: ${{ env.CONTRACT_ARTIFACTS_PATH }}
go_mod_path: ./integration-tests/go.mod
cl_repo: ${{ env.CL_ECR }}
cl_image_tag: solana.${{ env.CUSTOM_CORE_REF || github.event.inputs.cl_branch_ref || github.sha }}
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/e2e_testnet_daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: e2e_testnet_daily-changes
id: solana-e2e-detect-changes
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
steps:
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
repository: chainlink-solana-tests
tag: ${{ needs.get_solana_sha.outputs.sha }}
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: e2e_testnet_daily-build-artifacts
id: solana-e2e-build-artivacts
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
Expand Down Expand Up @@ -183,15 +183,15 @@ jobs:
steps:
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
repository: chainlink
tag: solana.${{ github.sha }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
- name: Build Image
if: steps.check-image.outputs.exists == 'false'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
should_checkout: true
cl_repo: smartcontractkit/chainlink
Expand All @@ -214,7 +214,7 @@ jobs:
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: e2e_testnet_daily-build-test-image
id: solana-e2e-build-test-image
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
Expand Down Expand Up @@ -268,18 +268,19 @@ jobs:
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: e2e_custom_run_daily_testnet_smoke_tests
id: solana-e2e-daily
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: E2E Run Daily Smoke Tests
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
test_command_to_run: cd ./integration-tests && go test -timeout 24h -count=1 -run TestSolanaGauntletOCRV2Smoke -json $(args) ./smoke 2>&1 | tee /tmp/gotest.log | gotestfmt
test_command_to_run: cd ./integration-tests && go test -timeout 24h -count=1 -run TestSolanaGauntletOCRV2Smoke -json $(args) ./smoke 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage
go_mod_path: ./integration-tests/go.mod
cl_repo: ${{ env.CL_ECR }}
cl_image_tag: solana.${{ github.sha }}
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
nix_path: nixpkgs=channel:nixos-unstable
- name: golangci-lint
run: nix develop -c make lint-go-integration-tests
- name: Print lint report artifact
if: failure()
shell: bash
run: cat ./integration-tests/golangci-lint-integration-tests-report.xml
- name: Store lint report artifact
if: always()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
Expand All @@ -35,9 +39,13 @@ jobs:
nix_path: nixpkgs=channel:nixos-unstable
- name: golangci-lint
run: nix develop -c make lint-go-relay
- name: Print lint report artifact
if: failure()
shell: bash
run: cat ./pkg/golangci-lint-relay-report.xml
- name: Store lint report artifact
if: always()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: golangci-lint-relay-report
path: ./pkg/golangci-lint-relay-report.xml
path: ./pkg/golangci-lint-relay-report.xml
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: integration-tests-publish-image
id: solana-e2e-publish
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/relay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,25 @@ jobs:
name: Relay Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: solana-relay-unit
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Relay Run Unit Tests
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
- name: Checkout sources
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Setup go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: "go.mod"
check-latest: true
- name: Install gotestloghelper
run: go install github.com/smartcontractkit/chainlink-testing-framework/tools/gotestloghelper@latest
- name: Check go mod tidy
run: |
go mod tidy
Expand All @@ -30,7 +42,7 @@ jobs:
- name: Build
run: go build -v ./pkg/...
- name: Test
run: go test ./pkg/... -v -tags integration -covermode=atomic -coverpkg=./... -coverprofile=integration_coverage.txt
run: go test ./pkg/... -json -tags integration -covermode=atomic -coverpkg=./... -coverprofile=integration_coverage.txt 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci
- name: Test with the race detector enabled
run: go test ./pkg/... -v -race -count=10 -timeout=15m -covermode=atomic -coverpkg=./... -coverprofile=race_coverage.txt
- name: Upload Go test results
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/soak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
steps:
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
repository: chainlink-solana-tests
tag: ${{ github.sha }}
Expand Down Expand Up @@ -92,14 +92,14 @@ jobs:
steps:
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
repository: chainlink
tag: solana.${{ github.sha }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
- name: Build Image
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
should_checkout: true
cl_repo: smartcontractkit/chainlink
Expand Down Expand Up @@ -142,9 +142,9 @@ jobs:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
test_command_to_run: cd ./integration-tests && go test -timeout 5h -count=1 -json $(args) ./soak 2>&1 | tee /tmp/gotest.log | gotestfmt
test_command_to_run: cd ./integration-tests && go test -timeout 5h -count=1 -json $(args) ./soak 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage
go_mod_path: ./integration-tests/go.mod
cl_repo: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
cl_image_tag: solana.${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Wait for Workflows
id: wait
uses: smartcontractkit/chainlink-github-actions/utils/wait-for-workflows@e29366cdecfe6befff9ab8c3cfe4825218505d58 # v2.3.16
uses: smartcontractkit/chainlink-github-actions/utils/wait-for-workflows@b49a9d04744b0237908831730f8553f26d73a94b # v2.3.17
with:
max-timeout: "1200"
polling-interval: "30"
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ tests-smoke-report.xml
overrides.toml

# Test & linter reports
.test_summary/
*report.xml
*report.json
*.out
*coverage*
eslint-report.json
.run.id

override*.toml
# go work files
go.work*
7 changes: 3 additions & 4 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
nodejs 16.13.2
nodejs 18.20.2
yarn 1.22.19
rust 1.59.0
golang 1.21.1
golangci-lint 1.52.1
golang 1.21.7
golangci-lint 1.55.2
pulumi 3.40.1
ginkgo 2.5.1
actionlint 1.6.22
shellcheck 0.8.0
helm 3.9.4
Expand Down
Loading

0 comments on commit 76e322c

Please sign in to comment.