Skip to content

update the cache used for LatestRoundRequested (#503) #2075

update the cache used for LatestRoundRequested (#503)

update the cache used for LatestRoundRequested (#503) #2075

name: Integration Tests - Smoke
on:
pull_request:
workflow_dispatch:
inputs:
cl_branch_ref:
description: Chainlink repo branch to integrate with
required: true
default: develop
type: string
# Only run 1 of this workflow at a time per PR
concurrency:
group: integration-tests-starknet-${{ github.ref }}
cancel-in-progress: true
env:
TEST_LOG_LEVEL: debug
CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-starknet-tests:${{ github.sha }}
jobs:
build_custom_chainlink_image:
name: Build Custom CL Image
runs-on: ubuntu-latest
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
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Build Custom CL Image
continue-on-error: true
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@2c9f401149f6c25fb632067b7e6626aebeee5d69 # v2.1.6
with:
repository: chainlink
tag: starknet.${{ 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 ${{ matrix.image.name }}
if: steps.check-image.outputs.exists == 'false'
# note using a temporary commit for build-image that works around the go get issues, replace when go get issues are fixed please
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@2c9f401149f6c25fb632067b7e6626aebeee5d69
with:
cl_repo: smartcontractkit/chainlink
cl_ref: ${{ github.event.inputs.cl_branch_ref }}
cl_dockerfile: ${{ matrix.image.dockerfile }}
# commit of the caller branch
dep_starknet_sha: ${{ github.event.pull_request.head.sha || github.sha }}
push_tag: ${{ env.CL_ECR }}:starknet.${{ github.sha }}${{ matrix.image.tag-suffix }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_PRIVATE_GHA_PULL: ${{ secrets.QA_PRIVATE_GHA_PULL }}
- name: Print Chainlink Image Built
run: |
echo "### chainlink image tag used for this test run :link:" >> $GITHUB_STEP_SUMMARY
echo "\`starknet.${{ github.sha }}${{ matrix.image.tag-suffix }}\`" >> $GITHUB_STEP_SUMMARY
build_test_image:
environment: integration
permissions:
id-token: write
contents: read
name: Build Test Image
runs-on: ubuntu20.04-32cores-128GB
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Build Test Image
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.sha }}
- name: Build 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 }}
run_tests:
name: Run Smoke Tests
runs-on: ubuntu20.04-16cores-64GB
needs: [ build_custom_chainlink_image, build_test_image ]
environment: integration
# these values need to match those used to build the chainlink image
strategy:
matrix:
image:
- name: ""
tag-suffix: ""
test-name: embedded
- name: plugins
tag-suffix: -plugins
test-name: plugins
env:
INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
steps:
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Run Smoke Tests ${{ matrix.image.name }}
continue-on-error: true
- name: Checkout the repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Nix
uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Install Cairo
uses: ./.github/actions/install-cairo
- name: Build contracts
run: |
cd contracts && scarb --profile release build
- name: Build gauntlet
run: |
yarn install && yarn build
- name: Generate config overrides
run: | # https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/config/README.md
cat << EOF > config.toml
[ChainlinkImage]
image="${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink"
version="starknet.${{ github.sha }}${{ matrix.image.tag-suffix }}"
[Network]
selected_networks=["SIMULATED"]
[Common]
internal_docker_repo = "${{ env.INTERNAL_DOCKER_REPO }}"
stateful_db = false
EOF
# shellcheck disable=SC2002
BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0)
# shellcheck disable=SC2086
echo ::add-mask::$BASE64_CONFIG_OVERRIDE
# shellcheck disable=SC2086
echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
- name: Run Tests ${{ matrix.image.name }}
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ea889b3133bd7f16ab19ba4ba130de5d9162c669 # v2.3.4
with:
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
test_command_to_run: nix develop -c helm repo update && make test=${{ matrix.image.test-name }} test-integration-smoke-ci
test_download_vendor_packages_command: cd integration-tests && nix develop -c go mod download
cl_repo: ${{ env.CL_ECR }}
cl_image_tag: starknet.${{ github.sha }}${{ matrix.image.tag-suffix }}
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 }}
artifacts_location: /home/runner/work/chainlink-starknet/chainlink-starknet/integration-tests/smoke/logs