Skip to content

Commit

Permalink
Merge branch 'ccip-develop' into feature/offchain-report-l1-base-fee-…
Browse files Browse the repository at this point in the history
…from-l2
  • Loading branch information
matYang committed Sep 27, 2023
2 parents 37badf1 + 1f14684 commit 76aa3ef
Show file tree
Hide file tree
Showing 48 changed files with 3,285 additions and 1,374 deletions.
1 change: 1 addition & 0 deletions .github/workflows/integration-tests-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- ccip-develop
workflow_dispatch:

env:
ECR_TAG: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-ccip-tests:develop
Expand Down
194 changes: 97 additions & 97 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,102 +142,102 @@ jobs:
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}

compare-tests:
needs: [changes]
runs-on: ubuntu-latest
name: Compare/Build Automation Test List
outputs:
matrix: ${{ env.MATRIX_JSON }}
steps:
- name: Check for Skip Tests Label
if: contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests')
run: |
echo "## \`skip-smoke-tests\` label is active, skipping E2E smoke tests" >>$GITHUB_STEP_SUMMARY
exit 0
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Compare Test Lists
run: |
cd ./integration-tests
./scripts/compareTestList.sh ./smoke/automation_test.go
./scripts/compareTestList.sh ./smoke/keeper_test.go
- name: Build Test Matrix Lists
id: build-test-matrix-list
run: |
cd ./integration-tests
MATRIX_JSON_AUTOMATION=$(./scripts/buildTestMatrixList.sh ./smoke/automation_test.go automation ubuntu20.04-8cores-32GB 1)
MATRIX_JSON_KEEPER=$(./scripts/buildTestMatrixList.sh ./smoke/keeper_test.go keeper ubuntu20.04-8cores-32GB 1)
COMBINED_ARRAY=$(jq -c -n "$MATRIX_JSON_AUTOMATION + $MATRIX_JSON_KEEPER")
echo "MATRIX_JSON=${COMBINED_ARRAY}" >> $GITHUB_ENV
# compare-tests:
# needs: [changes]
# runs-on: ubuntu-latest
# name: Compare/Build Automation Test List
# outputs:
# matrix: ${{ env.MATRIX_JSON }}
# steps:
# - name: Check for Skip Tests Label
# if: contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests')
# run: |
# echo "## \`skip-smoke-tests\` label is active, skipping E2E smoke tests" >>$GITHUB_STEP_SUMMARY
# exit 0
# - name: Checkout the repo
# uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
# - name: Compare Test Lists
# run: |
# cd ./integration-tests
# ./scripts/compareTestList.sh ./smoke/automation_test.go
# ./scripts/compareTestList.sh ./smoke/keeper_test.go
# - name: Build Test Matrix Lists
# id: build-test-matrix-list
# run: |
# cd ./integration-tests
# MATRIX_JSON_AUTOMATION=$(./scripts/buildTestMatrixList.sh ./smoke/automation_test.go automation ubuntu20.04-8cores-32GB 1)
# MATRIX_JSON_KEEPER=$(./scripts/buildTestMatrixList.sh ./smoke/keeper_test.go keeper ubuntu20.04-8cores-32GB 1)
# COMBINED_ARRAY=$(jq -c -n "$MATRIX_JSON_AUTOMATION + $MATRIX_JSON_KEEPER")
# echo "MATRIX_JSON=${COMBINED_ARRAY}" >> $GITHUB_ENV

eth-smoke-tests-matrix-automation:
if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
environment: integration
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
needs: [build-chainlink, changes, compare-tests]
env:
SELECTED_NETWORKS: SIMULATED,SIMULATED_1,SIMULATED_2
CHAINLINK_COMMIT_SHA: ${{ github.sha }}
CHAINLINK_ENV_USER: ${{ github.actor }}
TEST_LOG_LEVEL: debug
DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable
strategy:
fail-fast: false
matrix:
product: ${{fromJson(needs.compare-tests.outputs.matrix)}}
runs-on: ${{ matrix.product.os }}
name: ETH Smoke Tests ${{ matrix.product.name }}
steps:
- name: Checkout the repo
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
- name: Build Go Test Command
id: build-go-test-command
run: |
# if the matrix.product.run is set, use it for a different command
if [ "${{ matrix.product.run }}" != "" ]; then
echo "run_command=${{ matrix.product.run }} ./smoke/${{ matrix.product.file }}_test.go" >> "$GITHUB_OUTPUT"
else
echo "run_command=./smoke/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT"
fi
## Run this step when changes that require tests to be run are made
- name: Run Tests
if: needs.changes.outputs.src == 'true'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
env:
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 }}
with:
test_command_to_run: make test_need_operator_assets && cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestfmt
test_download_vendor_packages_command: cd ./integration-tests && go mod download
cl_repo: ${{ env.CHAINLINK_IMAGE }}
cl_image_tag: ${{ github.sha }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
artifacts_location: ./integration-tests/smoke/logs/
publish_check_name: ${{ matrix.product.name }}
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
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 }}
- name: Collect Metrics
if: always()
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@d2c2b7bdc9012651230b2608a1bcb0c48538b6ec
with:
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
this-job-name: ETH Smoke Tests ${{ matrix.product.name }}
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
continue-on-error: true
# eth-smoke-tests-matrix-automation:
# if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
# environment: integration
# permissions:
# checks: write
# pull-requests: write
# id-token: write
# contents: read
# needs: [build-chainlink, changes, compare-tests]
# env:
# SELECTED_NETWORKS: SIMULATED,SIMULATED_1,SIMULATED_2
# CHAINLINK_COMMIT_SHA: ${{ github.sha }}
# CHAINLINK_ENV_USER: ${{ github.actor }}
# TEST_LOG_LEVEL: debug
# DATABASE_URL: postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable
# strategy:
# fail-fast: false
# matrix:
# product: ${{fromJson(needs.compare-tests.outputs.matrix)}}
# runs-on: ${{ matrix.product.os }}
# name: ETH Smoke Tests ${{ matrix.product.name }}
# steps:
# - name: Checkout the repo
# uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
# with:
# ref: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
# - name: Build Go Test Command
# id: build-go-test-command
# run: |
# # if the matrix.product.run is set, use it for a different command
# if [ "${{ matrix.product.run }}" != "" ]; then
# echo "run_command=${{ matrix.product.run }} ./smoke/${{ matrix.product.file }}_test.go" >> "$GITHUB_OUTPUT"
# else
# echo "run_command=./smoke/${{ matrix.product.name }}_test.go" >> "$GITHUB_OUTPUT"
# fi
# ## Run this step when changes that require tests to be run are made
# - name: Run Tests
# if: needs.changes.outputs.src == 'true'
# uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@eccde1970eca69f079d3efb3409938a72ade8497 # v2.2.13
# env:
# 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 }}
# with:
# test_command_to_run: make test_need_operator_assets && cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestfmt
# test_download_vendor_packages_command: cd ./integration-tests && go mod download
# cl_repo: ${{ env.CHAINLINK_IMAGE }}
# cl_image_tag: ${{ github.sha }}
# aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
# artifacts_location: ./integration-tests/smoke/logs/
# publish_check_name: ${{ matrix.product.name }}
# token: ${{ secrets.GITHUB_TOKEN }}
# go_mod_path: ./integration-tests/go.mod
# 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 }}
# - name: Collect Metrics
# if: always()
# id: collect-gha-metrics
# uses: smartcontractkit/push-gha-metrics-action@d2c2b7bdc9012651230b2608a1bcb0c48538b6ec
# with:
# basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
# hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
# this-job-name: ETH Smoke Tests ${{ matrix.product.name }}
# test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
# continue-on-error: true

eth-smoke-tests-matrix:
if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }}
Expand Down Expand Up @@ -385,10 +385,10 @@ jobs:
if: always()
runs-on: ubuntu-latest
name: ETH Smoke Tests
needs: [eth-smoke-tests-matrix, eth-smoke-tests-matrix-automation]
needs: [eth-smoke-tests-matrix]
steps:
- name: Check smoke test matrix status
if: needs.eth-smoke-tests-matrix.result != 'success' || needs.eth-smoke-tests-matrix-automation.result != 'success'
if: needs.eth-smoke-tests-matrix.result != 'success'
run: exit 1
- name: Collect Metrics
if: always()
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.5.0-ccip1.0.0
v2.5.0-ccip1.2.0
5 changes: 5 additions & 0 deletions contracts/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ ALL_FOUNDRY_PRODUCTS = llo-feeds functions shared ccip
snapshot: ## Make a snapshot for a specific product.
export FOUNDRY_PROFILE=$(FOUNDRY_PROFILE) && forge snapshot --nmt "testFuzz_\w{1,}?" --snap gas-snapshots/$(FOUNDRY_PROFILE).gas-snapshot

.PHONY: snapshot-diff
snapshot-diff: ## Make a snapshot for a specific product.
export FOUNDRY_PROFILE=$(FOUNDRY_PROFILE) && forge snapshot --nmt "testFuzz_\w{1,}?" --diff gas-snapshots/$(FOUNDRY_PROFILE).gas-snapshot


.PHONY: snapshot-all
snapshot-all: ## Make a snapshot for all products.
for foundry_profile in $(ALL_FOUNDRY_PRODUCTS) ; do \
Expand Down
Loading

0 comments on commit 76aa3ef

Please sign in to comment.