-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9974 from smartcontractkit/release/2.3.0
release/2.3.0 -> master
- Loading branch information
Showing
1,141 changed files
with
81,286 additions
and
42,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: version-file-bump | ||
description: "Ensure that the VERSION file has been bumped since the last release." | ||
inputs: | ||
github-token: | ||
description: "Github access token" | ||
default: ${{ github.token }} | ||
required: true | ||
outputs: | ||
result: | ||
value: ${{ steps.compare.outputs.result }} | ||
description: 'Result of the comparison' | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Get latest release version | ||
id: get-latest-version | ||
shell: bash | ||
run: | | ||
untrimmed_ver=$( | ||
curl --header "Authorization: token ${{ inputs.github-token }}" \ | ||
--request GET \ | ||
"https://api.github.com/repos/${{ github.repository }}/releases/latest?draft=false&prerelease=false" \ | ||
| jq -r .name | ||
) | ||
latest_version="${untrimmed_ver:1}" | ||
echo "latest_version=${latest_version}" | tee -a "$GITHUB_OUTPUT" | ||
- name: Get current version | ||
id: get-current-version | ||
shell: bash | ||
run: | | ||
current_version=$(head -n1 ./VERSION) | ||
echo "current_version=${current_version}" | tee -a "$GITHUB_OUTPUT" | ||
- name: Compare semantic versions | ||
uses: smartcontractkit/chainlink-github-actions/[email protected] | ||
id: compare | ||
with: | ||
version1: ${{ steps.get-current-version.outputs.current_version }} | ||
operator: eq | ||
version2: ${{ steps.get-latest-version.outputs.latest_version }} | ||
- name: Fail if version not bumped | ||
# XXX: The reason we are not checking if the current is greater than the | ||
# latest release is to account for hot fixes which may have been branched | ||
# from a previous tag. | ||
shell: bash | ||
env: | ||
VERSION_NOT_BUMPED: ${{ steps.compare.outputs.result }} | ||
run: | | ||
if [[ "${VERSION_NOT_BUMPED:-}" = "true" ]]; then | ||
echo "Version file not bumped since last release. Please bump the ./VERSION file in the root of the repo and commit the change." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
name: Automation On Demand Tests | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
chainlinkVersion: | ||
description: Chainlink image version to use | ||
required: false | ||
type: string | ||
chainlinkImage: | ||
description: Chainlink image repo to use (Leave empty to build from head/ref) | ||
required: false | ||
type: string | ||
|
||
env: | ||
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:${{ github.sha }} | ||
CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink | ||
|
||
jobs: | ||
build-chainlink: | ||
environment: integration | ||
permissions: | ||
id-token: write | ||
contents: read | ||
strategy: | ||
matrix: | ||
image: | ||
- name: "" | ||
dockerfile: core/chainlink.Dockerfile | ||
tag-suffix: "" | ||
- name: (plugins) | ||
dockerfile: plugins/chainlink.Dockerfile | ||
tag-suffix: -plugins | ||
name: Build Chainlink Image ${{ matrix.image.name }} | ||
runs-on: ubuntu20.04-16cores-64GB | ||
steps: | ||
- name: Collect Metrics | ||
if: inputs.chainlinkImage == '' | ||
id: collect-gha-metrics | ||
uses: smartcontractkit/push-gha-metrics-action@8163dcea2f01a0a8fec84b284406ff7af1d2e1c0 | ||
with: | ||
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} | ||
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} | ||
this-job-name: Build Chainlink Image ${{ matrix.image.name }} | ||
continue-on-error: true | ||
- name: Checkout the repo | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
ref: ${{ github.head_ref || github.ref_name }} | ||
- name: Check if image exists | ||
if: inputs.chainlinkImage == '' | ||
id: check-image | ||
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@bc6e3b5cf369b76e361d372ceb7d144525635ce0 #v2.2.0 | ||
with: | ||
repository: chainlink | ||
tag: ${{ github.sha }}${{ matrix.image.tag-suffix }} | ||
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' && inputs.chainlinkImage == '' | ||
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@bc6e3b5cf369b76e361d372ceb7d144525635ce0 # v2.2.0 | ||
with: | ||
cl_repo: smartcontractkit/chainlink | ||
cl_ref: ${{ github.sha }} | ||
cl_dockerfile: ${{ matrix.image.dockerfile }} | ||
push_tag: ${{ env.CHAINLINK_IMAGE }}:${{ github.sha }}${{ matrix.image.tag-suffix }} | ||
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||
- name: Print Chainlink Image Built | ||
if: inputs.chainlinkImage == '' | ||
run: | | ||
echo "### chainlink node image tag used for this test run :link:" >>$GITHUB_STEP_SUMMARY | ||
echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY | ||
build-test-image: | ||
environment: integration | ||
permissions: | ||
id-token: write | ||
contents: read | ||
name: Build Test Image | ||
runs-on: ubuntu20.04-16cores-64GB | ||
steps: | ||
- name: Collect Metrics | ||
id: collect-gha-metrics | ||
uses: smartcontractkit/push-gha-metrics-action@8163dcea2f01a0a8fec84b284406ff7af1d2e1c0 | ||
with: | ||
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} | ||
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} | ||
this-job-name: Build Test Image | ||
continue-on-error: true | ||
- name: Checkout the repo | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
ref: ${{ github.head_ref || github.ref_name }} | ||
- name: Build Test Image | ||
uses: ./.github/actions/build-test-image | ||
with: | ||
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }} | ||
|
||
automation-on-demand-tests: | ||
environment: integration | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
id-token: write | ||
contents: read | ||
needs: [ build-chainlink, build-test-image ] | ||
env: | ||
CHAINLINK_COMMIT_SHA: ${{ github.sha }} | ||
CHAINLINK_ENV_USER: ${{ github.actor }} | ||
TEST_LOG_LEVEL: debug | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tests: | ||
- name: chaos | ||
suite: chaos | ||
nodes: 5 | ||
os: ubuntu-latest | ||
pyroscope_env: ci-automation-on-demand-chaos | ||
network: SIMULATED | ||
command: -run ^TestAutomationChaos$ ./chaos | ||
- name: reorg | ||
suite: reorg | ||
nodes: 1 | ||
os: ubuntu-latest | ||
pyroscope_env: ci-automation-on-demand-reorg | ||
network: SIMULATED_NONDEV | ||
command: -run ^TestAutomationReorg$ ./reorg | ||
- name: upgrade | ||
suite: smoke | ||
nodes: 1 | ||
os: ubuntu-latest | ||
pyroscope_env: ci-automation-on-demand-upgrade | ||
network: SIMULATED | ||
command: -run ^TestAutomationNodeUpgrade$ ./smoke | ||
runs-on: ${{ matrix.tests.os }} | ||
name: Automation On Demand ${{ matrix.tests.name }} Test | ||
steps: | ||
- name: Checkout the repo | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
with: | ||
ref: ${{ github.head_ref || github.ref_name }} | ||
- name: Determine build to use | ||
id: determine-build | ||
shell: bash | ||
run: | | ||
if [[ "${{ inputs.chainlinkImage }}" == "" ]]; then | ||
echo "image=${{ env.CHAINLINK_IMAGE }}" >>$GITHUB_OUTPUT | ||
echo "version=${{ github.sha }}" >>$GITHUB_OUTPUT | ||
echo "upgrade_version=${{ github.sha }}" >>$GITHUB_OUTPUT | ||
else | ||
echo "image=${{ inputs.chainlinkImage }}" >>$GITHUB_OUTPUT | ||
echo "version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT | ||
echo "upgrade_version=${{ inputs.chainlinkVersion }}" >>$GITHUB_OUTPUT | ||
fi | ||
if [[ "${{ matrix.tests.name }}" == "upgrade" ]]; then | ||
echo "image=${{ env.CHAINLINK_IMAGE }}" >>$GITHUB_OUTPUT | ||
echo "version=develop" >>$GITHUB_OUTPUT | ||
fi | ||
- name: Run Tests | ||
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@bc6e3b5cf369b76e361d372ceb7d144525635ce0 #v2.2.0 | ||
env: | ||
PYROSCOPE_SERVER: ${{ matrix.tests.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.tests.pyroscope_env }} | ||
PYROSCOPE_KEY: ${{ secrets.QA_PYROSCOPE_KEY }} | ||
SELECTED_NETWORKS: ${{ matrix.tests.network }} | ||
TEST_SUITE: ${{ matrix.tests.suite }} | ||
TEST_UPGRADE_VERSION: ${{ steps.determine-build.outputs.upgrade_version }} | ||
TEST_UPGRADE_IMAGE: ${{ env.CHAINLINK_IMAGE }} | ||
with: | ||
test_command_to_run: make test_need_operator_assets && cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.tests.nodes }} ${{ matrix.tests.command }} 2>&1 | tee /tmp/gotest.log | gotestfmt | ||
test_download_vendor_packages_command: cd ./integration-tests && go mod download | ||
cl_repo: ${{ steps.determine-build.outputs.image }} | ||
cl_image_tag: ${{ steps.determine-build.outputs.version }} | ||
artifacts_location: ./integration-tests/${{ matrix.tests.suite }}/logs | ||
publish_check_name: Automation On Demand Results ${{ matrix.tests.name }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
go_mod_path: ./integration-tests/go.mod | ||
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} | ||
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} | ||
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} | ||
- name: Upload test log | ||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | ||
if: failure() | ||
with: | ||
name: test-log-${{ matrix.tests.name }} | ||
path: /tmp/gotest.log | ||
retention-days: 7 | ||
continue-on-error: true | ||
- name: Collect Metrics | ||
if: always() | ||
id: collect-gha-metrics | ||
uses: smartcontractkit/push-gha-metrics-action@8163dcea2f01a0a8fec84b284406ff7af1d2e1c0 | ||
with: | ||
basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }} | ||
hostname: ${{ secrets.GRAFANA_CLOUD_HOST }} | ||
this-job-name: Automation On Demand ${{ matrix.tests.name }} Test | ||
test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}' | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.