Skip to content

Commit

Permalink
Merge branch 'develop' into remove-txm-db-refs-in-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-momin authored Dec 14, 2023
2 parents afa6f6d + 7dd42eb commit e05ba63
Show file tree
Hide file tree
Showing 313 changed files with 5,800 additions and 3,273 deletions.
7 changes: 1 addition & 6 deletions .github/actions/golangci-lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,9 @@ runs:
shell: bash
run: mkdir -p core/web/assets && touch core/web/assets/index.html
- name: Build binary
if: ${{ inputs.go-directory == '.' }}
shell: bash
run: go build ./...
- name: Build binary
if: ${{ inputs.go-directory != '.' }}
working-directory: ${{ inputs.go-directory }}
shell: bash
run: go build
run: go build ./...
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/ci-chaincli.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/ci-scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI Scripts

on:
push:
pull_request:

jobs:
golangci:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Golang Lint
uses: ./.github/actions/golangci-lint
with:
name: scripts-lint
go-directory: core/scripts
go-version-file: core/scripts/go.mod
go-module-file: core/scripts/go.sum
gc-basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
gc-host: ${{ secrets.GRAFANA_CLOUD_HOST }}

test:
if: ${{ github.event_name == 'pull_request' }}
name: scripts-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go
uses: ./.github/actions/setup-go
with:
go-version-file: core/scripts/go.mod
go-module-file: core/scripts/go.sum
- name: Run Tests
shell: bash
working-directory: core/scripts
run: go test ./...
- name: Collect Metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: scripts-test
continue-on-error: true
67 changes: 66 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,73 @@ jobs:
- name: ocr
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRJobReplacement
file: ocr
pyroscope_env: ci-smoke-ocr-evm-simulated
- name: ocr-geth
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRBasic
file: ocr
client: geth
pyroscope_env: ci-smoke-ocr-evm-simulated
# Uncomment, when https://smartcontract-it.atlassian.net/browse/TT-753 is DONE
# - name: ocr-nethermind
# nodes: 1
# os: ubuntu20.04-8cores-32GB
# run: -run TestOCRBasic
# file: ocr
# client: nethermind
# pyroscope_env: ci-smoke-ocr-evm-simulated
- name: ocr-besu
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRBasic
file: ocr
client: besu
pyroscope_env: ci-smoke-ocr-evm-simulated
- name: ocr-erigon
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRBasic
file: ocr
client: erigon
pyroscope_env: ci-smoke-ocr-evm-simulated
- name: ocr2
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRv2JobReplacement
file: ocr2
pyroscope_env: ci-smoke-ocr2-evm-simulated
- name: ocr2-geth
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRv2Basic
file: ocr2
client: geth
pyroscope_env: ci-smoke-ocr2-evm-simulated
# Uncomment, when https://smartcontract-it.atlassian.net/browse/TT-753 is DONE
# - name: ocr2-nethermind
# nodes: 1
# os: ubuntu20.04-8cores-32GB
# run: -run TestOCRv2Basic
# file: ocr2
# client: nethermind
# pyroscope_env: ci-smoke-ocr2-evm-simulated
- name: ocr2-besu
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRv2Basic
file: ocr2
client: besu
pyroscope_env: ci-smoke-ocr2-evm-simulated
- name: ocr2-erigon
nodes: 1
os: ubuntu20.04-8cores-32GB
run: -run TestOCRv2Basic
file: ocr2
client: erigon
pyroscope_env: ci-smoke-ocr2-evm-simulated
- name: ocr2
nodes: 1
os: ubuntu20.04-8cores-32GB
Expand All @@ -345,12 +407,14 @@ jobs:
pyroscope_env: ci-smoke-vrf-evm-simulated
- name: vrfv2
nodes: 1
run: -run TestVRFv2MultipleSendingKeys
file: vrfv2
os: ubuntu20.04-8cores-32GB
pyroscope_env: ci-smoke-vrf2-evm-simulated
- name: vrfv2plus
nodes: 1
os: ubuntu20.04-8cores-32GB
pyroscope_env: ci-smoke-vrf2plus-evm-simulated
pyroscope_env: ci-smoke-vrf2plus-evm-simulated
- name: forwarder_ocr
nodes: 1
os: ubuntu20.04-8cores-32GB
Expand Down Expand Up @@ -435,6 +499,7 @@ jobs:
PYROSCOPE_SERVER: ${{ matrix.product.pyroscope_env == '' && '' || !startsWith(github.ref, 'refs/tags/') && '' || secrets.QA_PYROSCOPE_INSTANCE }} # Avoid sending blank envs https://github.com/orgs/community/discussions/25725
PYROSCOPE_ENVIRONMENT: ${{ matrix.product.pyroscope_env }}
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
ETH2_EL_CLIENT: ${{matrix.product.client}}
LOKI_TENANT_ID: ${{ vars.LOKI_TENANT_ID }}
LOKI_URL: ${{ secrets.LOKI_URL }}
LOKI_BASIC_AUTH: ${{ secrets.LOKI_BASIC_AUTH }}
Expand Down
57 changes: 2 additions & 55 deletions .github/workflows/live-testnet-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ env:
BSC_TESTNET_URLS: ${{ secrets.QA_BSC_TESTNET_URLS }}
BSC_TESTNET_HTTP_URLS: ${{ secrets.QA_BSC_TESTNET_HTTP_URLS }}

OPTIMISM_GOERLI_URLS: ${{ secrets.QA_OPTIMISM_GOERLI_URLS }}
OPTIMISM_GOERLI_HTTP_URLS: ${{ secrets.QA_OPTIMISM_GOERLI_HTTP_URLS }}

OPTIMISM_SEPOLIA_URLS: ${{ secrets.QA_OPTIMISM_SEPOLIA_URLS }}
OPTIMISM_SEPOLIA_HTTP_URLS: ${{ secrets.QA_OPTIMISM_SEPOLIA_HTTP_URLS }}

Expand Down Expand Up @@ -147,7 +144,7 @@ jobs:
id-token: write
contents: read
runs-on: ubuntu-latest
needs: [sepolia-smoke-tests, bsc-testnet-tests, optimism-goerli-smoke-tests, optimism-sepolia-smoke-tests, arbitrum-sepolia-smoke-tests, base-goerli-smoke-tests, base-sepolia-smoke-tests, polygon-mumbai-smoke-tests, avalanche-fuji-smoke-tests, fantom-testnet-smoke-tests, celo-alfajores-smoke-tests, scroll-sepolia-smoke-tests, linea-goerli-smoke-tests]
needs: [sepolia-smoke-tests, bsc-testnet-tests, optimism-sepolia-smoke-tests, arbitrum-sepolia-smoke-tests, base-goerli-smoke-tests, base-sepolia-smoke-tests, polygon-mumbai-smoke-tests, avalanche-fuji-smoke-tests, fantom-testnet-smoke-tests, celo-alfajores-smoke-tests, scroll-sepolia-smoke-tests, linea-goerli-smoke-tests]
steps:
- name: Debug Result
run: echo ${{ join(needs.*.result, ',') }}
Expand Down Expand Up @@ -208,7 +205,7 @@ jobs:
strategy:
fail-fast: false
matrix:
network: [Sepolia, Optimism Goerli, Optimism Sepolia, Arbitrum Sepolia, Base Goerli, Base Sepolia, Polygon Mumbai, Avalanche Fuji, Fantom Testnet, Celo Alfajores, Scroll Sepolia, Linea Goerli]
network: [Sepolia, Optimism Sepolia, Arbitrum Sepolia, Base Goerli, Base Sepolia, Polygon Mumbai, Avalanche Fuji, Fantom Testnet, Celo Alfajores, Scroll Sepolia, Linea Goerli]
steps:
- name: Get Results
id: test-results
Expand Down Expand Up @@ -391,56 +388,6 @@ jobs:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}

optimism-goerli-smoke-tests:
environment: integration
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
needs: [build-chainlink, build-tests]
env:
SELECTED_NETWORKS: OPTIMISM_GOERLI
strategy:
fail-fast: false
max-parallel: 1
matrix:
include: # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-adding-configurations
- product: OCR
test: TestOCRBasic
- product: Automation Conditional
test: TestAutomationBasic/registry_2_1_conditional
- product: Automation Log Trigger
test: TestAutomationBasic/registry_2_1_logtrigger
name: Optimism Goerli ${{ matrix.product }} Tests
runs-on: ubuntu-latest
steps:
- name: Download Tests Binary
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: tests
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests-binary@912bed7e07a1df4d06ea53a031e9773bb65dc7bd # v2.3.0
env:
PYROSCOPE_SERVER: ${{ secrets.QA_PYROSCOPE_INSTANCE }}
PYROSCOPE_ENVIRONMENT: ci-smoke-${{ matrix.product }}-optimism-goerli
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }}
with:
test_command_to_run: ./tests -test.timeout 30m -test.count=1 -test.parallel=1 -test.run ${{ matrix.test }}
binary_name: tests
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ github.sha }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }}
artifacts_location: ./logs
token: ${{ secrets.GITHUB_TOKEN }}
cache_key_id: core-e2e-${{ env.MOD_CACHE_VERSION }}
cache_restore_only: "true"
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}

optimism-sepolia-smoke-tests:
environment: integration
permissions:
Expand Down
45 changes: 31 additions & 14 deletions .github/workflows/on-demand-ocr-soak-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,16 @@ on:
description: Container image version for the Chainlink nodes
required: true
default: "2.7.0"
testDuration:
description: Duration of the test (time string)
required: false
default: 15m
chainlinkNodeFunding:
description: How much to fund each Chainlink node (in ETH)
required: false
default: ".001"
timeBetweenRounds:
description: How long to wait before starting a new round
ocrVersion:
description: Version of OCR to Use
type: choice
options:
- 1
- 2
testInputs:
description: Duration;Funding;TimeBetweenRounds
required: false
default: 1m
default: "10m;.1;1m"

jobs:
ocr_soak_test:
Expand All @@ -84,9 +82,7 @@ jobs:
SELECTED_NETWORKS: ${{ inputs.network }}
SLACK_API_KEY: ${{ secrets.QA_SLACK_API_KEY }}
SLACK_CHANNEL: ${{ secrets.QA_SLACK_CHANNEL }}
OCR_TEST_DURATION: ${{ inputs.testDuration }}
OCR_CHAINLINK_NODE_FUNDING: ${{ inputs.chainlinkNodeFunding }}
OCR_TIME_BETWEEN_ROUNDS: ${{ inputs.timeBetweenRounds }}
OCR_VERSION: ${{ inputs.ocrVersion }}
TEST_LOG_LEVEL: debug
REF_NAME: ${{ github.head_ref || github.ref_name }}
ENV_JOB_IMAGE_BASE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests
Expand All @@ -101,6 +97,7 @@ jobs:
continue-on-error: true
- name: Get Inputs
run: |
# Mask the sensitive inputs
EVM_URLS=$(jq -r '.inputs.wsURL' $GITHUB_EVENT_PATH)
EVM_HTTP_URLS=$(jq -r '.inputs.httpURL' $GITHUB_EVENT_PATH)
EVM_KEYS=$(jq -r '.inputs.fundingPrivateKey' $GITHUB_EVENT_PATH)
Expand All @@ -115,6 +112,26 @@ jobs:
echo EVM_HTTP_URLS=$EVM_HTTP_URLS >> $GITHUB_ENV
echo EVM_KEYS=$EVM_KEYS >> $GITHUB_ENV
echo SLACK_USER=$SLACK_USER >> $GITHUB_ENV
# Read in our test inputs
IFS=';' read -ra parts <<< "${{ inputs.testInputs }}"
index=0
for part in "${parts[@]}"; do
# A little hacky, but good enough for this
if [ $index -eq 0 ]; then
echo "OCR_TEST_DURATION=$part"
echo "OCR_TEST_DURATION=$part" >> $GITHUB_ENV
elif [ $index -eq 1 ]; then
echo "OCR_CHAINLINK_NODE_FUNDING=$part"
echo "OCR_CHAINLINK_NODE_FUNDING=$part" >> $GITHUB_ENV
elif [ $index -eq 2 ]; then
echo "OCR_TIME_BETWEEN_ROUNDS=$part"
echo "OCR_TIME_BETWEEN_ROUNDS=$part" >> $GITHUB_ENV
else
echo "Additional Unregistered Input: $part"
fi
((index+=1))
done
- name: Checkout the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
Loading

0 comments on commit e05ba63

Please sign in to comment.