Skip to content

Update CODEOWNERS to remove BIX, swap DF #2867

Update CODEOWNERS to remove BIX, swap DF

Update CODEOWNERS to remove BIX, swap DF #2867

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
team:
description: Team to run the tests for (e.g. BIX, CCIP)
required: true
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:
# for PR builds, ${{ github.sha }} is the temporary merge commit, we want the head commit instead
SN_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
TEST_LOG_LEVEL: debug
CL_ECR: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com
jobs:
build_chainlink_images:
name: Build Chainlink Image
strategy:
matrix:
include:
- platform: "linux/arm64"
runner: ubuntu-24.04-arm
arch: arm64
- platform: "linux/amd64"
runner: ubuntu-24.04
arch: amd64
runs-on: ${{ matrix.runner }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
environment: integration
permissions:
id-token: write
contents: read
outputs:
docker-image-sha-digest-arm64:
${{ steps.build-core.outputs.docker-image-sha-digest-arm64 }}
docker-image-sha-digest-amd64:
${{ steps.build-core.outputs.docker-image-sha-digest-amd64 }}
steps:
- name: Check if chainlink-starknet image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19
with:
repository: chainlink
tag: starknet.${{ env.SN_SHA }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
- name: Get core ref from PR body
if: steps.check-image.outputs.exists == 'false' && github.event_name == 'pull_request'
run: |
comment=$(gh pr view https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }} --json body -q '.body')
core_ref=$(echo $comment | grep -oP 'core ref: \K\S+' || true)
if [ ! -z "$core_ref" ]; then
echo "CUSTOM_CORE_REF=${core_ref}" >> "${GITHUB_ENV}"
else
echo "CUSTOM_CORE_REF=develop" >> "${GITHUB_ENV}"
fi
- name: Set core reference if workflow dispatch
if: steps.check-image.outputs.exists == 'false' && github.event_name == 'workflow_dispatch'
run: |
echo "CUSTOM_CORE_REF=${CL_REF}" >> "${GITHUB_ENV}"
env:
CL_REF: ${{ github.event.inputs.cl_branch_ref }}
- name: Checkout the repo
if: steps.check-image.outputs.exists == 'false'
uses: actions/checkout@v5
with:
repository: smartcontractkit/chainlink
ref: ${{ env.CUSTOM_CORE_REF }}
persist-credentials: false
- name: Build Image
id: build-core
if: steps.check-image.outputs.exists == 'false'
uses: smartcontractkit/.github/actions/ctf-build-image@61c6a8d174fcae10d436cc38c577f962396babbe # v1.3.0
with:
platform: ${{ matrix.platform }}
dockerfile: plugins/chainlink.Dockerfile
plugin-manifest-overrides: |
starknet=${{ env.SN_SHA }}
# registry info
docker-registry-url: ${{ env.CL_ECR }}
docker-repository-name: chainlink
image-tag: starknet.${{ env.SN_SHA }}-${{ matrix.arch }}
aws-region: ${{ secrets.QA_AWS_REGION }}
aws-role-arn: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
aws-account-number: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
- name: Print Chainlink Image Built
run: |
echo "### chainlink image tag used for this test run :link:" >> $GITHUB_STEP_SUMMARY
echo "\`starknet.${{ env.SN_SHA }}-${{ matrix.arch }}\`" >> $GITHUB_STEP_SUMMARY
build_multiplatform_image:
name: Build Multi-Platform Chainlink Image
needs: build_chainlink_images
environment: integration
permissions:
id-token: write
contents: read
runs-on: ubuntu-24.04
steps:
- uses: smartcontractkit/.github/actions/build-push-docker-manifest@ce87497eb287565c796a8a781508be949f3ed1e2 # build-push-docker@1.0.0
with:
# Used for verifying the image signed with cosign.
cosign-oidc-identity-regexp: "^https://github.com/smartcontractkit/.*$"
docker-registry-url: ${{ env.CL_ECR }}
docker-repository-name: chainlink
docker-manifest-sign: true
docker-manifest-tag: starknet.${{ env.SN_SHA }}
docker-image-name-digests: >-
${{
format(
'{0},{1}',
needs.build_chainlink_images.outputs.docker-image-sha-digest-amd64,
needs.build_chainlink_images.outputs.docker-image-sha-digest-arm64
)
}}
aws-region: ${{ secrets.QA_AWS_REGION }}
aws-role-arn: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
aws-account-number: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
build_test_image:
environment: integration
permissions:
id-token: write
contents: read
name: Build Test Image
runs-on: ubuntu24.04-32cores-128GB
steps:
- name: Setup GitHub Token
id: setup-github-token
uses: smartcontractkit/.github/actions/setup-github-token@744f70475fb76191f29debf2d581ffc095a650a4 # setup-github-token/v1
with:
aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.GATI_RELENG_LAMBDA_URL }}
aws-region: ${{ secrets.QA_AWS_REGION }}
- name: Checkout the repo
uses: actions/checkout@v5
with:
ref: ${{ github.sha }}
persist-credentials: false
- 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 }}
GITHUB_TOKEN: ${{ steps.setup-github-token.outputs.access-token }}
run_tests:
name: Run Smoke Tests
runs-on: ubuntu24.04-16cores-64GB
needs: [build_multiplatform_image, build_test_image]
environment: integration
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: Checkout the repo
uses: actions/checkout@v5
with:
persist-credentials: false
- name: Install Nix
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # nix:v2.24.6
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Install Cairo
uses: ./.github/actions/install-cairo
- name: Setup GitHub Token
id: setup-github-token
uses: smartcontractkit/.github/actions/setup-github-token@744f70475fb76191f29debf2d581ffc095a650a4 # setup-github-token/v1
with:
aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_READ_ONLY_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.GATI_RELENG_LAMBDA_URL }}
aws-region: ${{ secrets.QA_AWS_REGION }}
- 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
[Network]
selected_networks=["SIMULATED"]
[Common]
internal_docker_repo = "${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
uses: smartcontractkit/.github/actions/ctf-run-tests@6a6f23140de2d90b020ba3795568d2ed85cb11b9 # 0.7.0
with:
cl_internal_docker_repo: ${{ env.INTERNAL_DOCKER_REPO }}
aws_registries: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
test_command_to_run: nix develop -c sh -c "make test-integration-smoke-ci"
test_download_vendor_packages_command: cd integration-tests && nix develop -c go mod download
cl_repo: ${{ env.CL_ECR }}/chainlink
cl_image_tag: starknet.${{ env.SN_SHA }}
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 }}
PROD_AWS_ROLE_TO_ASSUME: ${{ secrets.AWS_OIDC_IAM_PROD_INTEGRATION_ROLE_ARN }}
artifacts_location: /home/runner/work/chainlink-starknet/chainlink-starknet/integration-tests/smoke/logs
PROD_AWS_REGION: ${{ secrets.PROD_AWS_REGION}}
PROD_AWS_ACCOUNT_NUMBER: ${{ secrets.PROD_AWS_ACCOUNT_NUMBER }}
gauntlet_plus_plus_image: ${{ secrets.PROD_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.PROD_AWS_REGION }}.amazonaws.com/gauntlet-plus-plus:v2.5.20
gati_token: ${{ steps.setup-github-token.outputs.access-token }}
enable-gap: false
env:
KILLGRAVE_INTERNAL_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/friendsofgo/killgrave
CHAINLINK_IMAGE: ${{ env.CL_ECR }}/chainlink
CHAINLINK_VERSION: starknet.${{ env.SN_SHA }}
CHAINLINK_USER_TEAM: ${{ github.event.inputs.team || 'DF' }}