Fix ci #1510
Workflow file for this run
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
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@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.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@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
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@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | |
- name: Install Nix | |
uses: cachix/install-nix-action@29bd9290ef037a3ecbdafe83cbd2185e9dd0fa0a # v20 | |
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: 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 |