@@ -848,237 +848,29 @@ jobs:
848848 echo "sha is: ${full_sha}"
849849 echo "sha=${full_sha}" | tee -a "$GITHUB_OUTPUT"
850850
851- solana-test-image-exists :
852- environment : integration
851+ run-solana-smoke-tests :
852+ name : Run Solana Smoke Tests
853+ needs : [build-chainlink, get-solana-sha, solana-smoke-tests-setup]
853854 permissions :
854- checks : write
855- pull-requests : write
856855 id-token : write
857856 contents : read
858- name : Check If Solana Test Image Exists
859- runs-on : ubuntu-latest
860- needs : [get-solana-sha]
861- outputs :
862- exists : ${{ steps.check-image.outputs.exists }}
863- steps :
864- - name : Check if image exists
865- id : check-image
866- uses : smartcontractkit/chainlink-github-actions/docker/image-exists@0ce1e67b254a4f041e03cc6f0e3afc987b47c7bd # v2.3.30
867- with :
868- repository : chainlink-solana-tests
869- tag : ${{ needs.get-solana-sha.outputs.sha }}
870- AWS_REGION : ${{ secrets.QA_AWS_REGION }}
871- AWS_ROLE_TO_ASSUME : ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
872-
873- solana-build-contracts :
874- name : Solana Build Artifacts
875857 if : needs.solana-smoke-tests-setup.outputs.should-run-solana-tests == 'true'
876- environment : integration
877- permissions :
878- checks : write
879- pull-requests : write
880- id-token : write
881- contents : read
882- runs-on : ubuntu22.04-8cores-32GB
883- needs :
884- [
885- changes,
886- solana-test-image-exists,
887- get-solana-sha,
888- solana-smoke-tests-setup,
889- ]
890- steps :
891- - name : Checkout the solana repo
892- uses : actions/checkout@v4
893- with :
894- persist-credentials : false
895- repository : smartcontractkit/chainlink-solana
896- ref : ${{ needs.get-solana-sha.outputs.sha }}
897- - name : Build contracts
898- if : needs.solana-test-image-exists.outputs.exists == 'false'
899- uses : smartcontractkit/chainlink-solana/.github/actions/build_contract_artifacts@841f6229b6a0be0114c47cb676b1136d92f935c9 # node20 update on may 10, 2024
900- with :
901- ref : ${{ needs.get-solana-sha.outputs.sha }}
902- runner-os : ${{ runner.os }}
903-
904- solana-build-test-image :
905- name : Solana Build Test Image
906- if : needs.solana-smoke-tests-setup.outputs.should-run-solana-tests == 'true'
907- environment : integration
908- permissions :
909- checks : write
910- pull-requests : write
911- id-token : write
912- contents : read
913- runs-on : ubuntu22.04-8cores-32GB
914- needs :
915- [
916- solana-build-contracts,
917- solana-test-image-exists,
918- changes,
919- get-solana-sha,
920- solana-smoke-tests-setup,
921- ]
922- env :
923- CONTRACT_ARTIFACTS_PATH : contracts/target/deploy
924- GOTOOLCHAIN : auto
925- steps :
926- - name : Checkout the repo
927- if : needs.solana-test-image-exists.outputs.exists == 'false'
928- uses : actions/checkout@v4
929- with :
930- persist-credentials : false
931- repository : smartcontractkit/chainlink-solana
932- ref : ${{ needs.get-solana-sha.outputs.sha }}
933- - name : Download Artifacts
934- if : needs.solana-test-image-exists.outputs.exists == 'false'
935- uses : actions/download-artifact@v4
936- with :
937- name : artifacts
938- path : ${{ env.CONTRACT_ARTIFACTS_PATH }}
939- - name : Build Test Image
940- if : needs.solana-test-image-exists.outputs.exists == 'false'
941- uses : smartcontractkit/.github/actions/ctf-build-test-image@ctf-build-test-image/0.3.0
942- with :
943- repository : chainlink-solana-tests
944- tag : ${{ needs.get-solana-sha.outputs.sha }}
945- suites : smoke
946- QA_AWS_ROLE_TO_ASSUME : ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
947- QA_AWS_REGION : ${{ secrets.QA_AWS_REGION }}
948- QA_AWS_ACCOUNT_NUMBER : ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
949-
950- solana-smoke-tests :
951- environment : integration
952- permissions :
953- checks : write
954- pull-requests : write
955- id-token : write
956- contents : read
957- name : Solana Smoke Tests
958- if : needs.solana-smoke-tests-setup.outputs.should-run-solana-tests == 'true'
959- runs-on : ${{ needs.labels.outputs.builder-runner-label || 'ubuntu22.04-8cores-32GB' }}
960- needs :
961- [
962- build-chainlink,
963- solana-build-contracts,
964- solana-build-test-image,
965- labels,
966- changes,
967- get-solana-sha,
968- solana-smoke-tests-setup,
969- ]
970- env :
971- CHAINLINK_COMMIT_SHA : ${{ inputs.evm-ref || inputs.cl_ref || github.sha }}
972- CHAINLINK_ENV_USER : ${{ github.actor }}
973- TEST_LOG_LEVEL : debug
974- CONTRACT_ARTIFACTS_PATH : contracts/target/deploy
975- steps :
976- - name : Enable S3 Cache for Self-Hosted Runners
977- # these env vars are set (and exposed) when it is a self-hosted runner with extras=s3-cache
978- if : ${{ env.RUNS_ON_INSTANCE_ID != '' && env.ACTIONS_CACHE_URL != '' }}
979- uses : runs-on/action@66d4449b717b5462159659523d1241051ff470b9 # v1
980- - name : Checkout the repo
981- uses : actions/checkout@v4
982- with :
983- persist-credentials : false
984- repository : smartcontractkit/chainlink-solana
985- ref : ${{ needs.get-solana-sha.outputs.sha }}
986- - name : Run Setup
987- uses : smartcontractkit/.github/actions/ctf-setup-run-tests-environment@ctf-setup-run-tests-environment/0.8.0
988- with :
989- go_mod_path : ./integration-tests/go.mod
990- cache_restore_only : true
991- cache_key_id : core-solana-e2e-${{ env.MOD_CACHE_VERSION }}
992- aws_registries : ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
993- dockerhub_username : ${{ secrets.DOCKERHUB_READONLY_USERNAME }}
994- dockerhub_password : ${{ secrets.DOCKERHUB_READONLY_PASSWORD }}
995- QA_AWS_REGION : ${{ secrets.QA_AWS_REGION }}
996- QA_AWS_ROLE_TO_ASSUME : ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
997- enable-gap : " false"
998- - name : Pull Artifacts
999- run : |
1000- IMAGE_NAME=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get-solana-sha.outputs.sha }}
1001- # Pull the Docker image
1002- docker pull "$IMAGE_NAME"
1003-
1004- # Create a container without starting it
1005- CONTAINER_ID=$(docker create "$IMAGE_NAME")
1006-
1007- # Copy the artifacts from the container
1008- mkdir -p ./${{env.CONTRACT_ARTIFACTS_PATH}}/
1009- docker cp "$CONTAINER_ID:/go/testdir/${{env.CONTRACT_ARTIFACTS_PATH}}/" "./${{env.CONTRACT_ARTIFACTS_PATH}}/../"
1010-
1011- # Remove the created container
1012- docker rm "$CONTAINER_ID"
1013- - name : Install Solana CLI # required for ensuring the local test validator is configured correctly
1014- run : ./scripts/install-solana-ci.sh
1015-
1016- - name : Install gauntlet
1017- run : |
1018- yarn --cwd ./gauntlet install --frozen-lockfile
1019- yarn --cwd ./gauntlet build
1020- yarn --cwd ./gauntlet gauntlet
1021- - name : Generate config overrides
1022- env :
1023- VERSION : ${{ inputs.evm-ref || env.CHAINLINK_REF }}
1024- run :
1025- | # https://github.com/smartcontractkit/chainlink-testing-framework/lib/blob/main/config/README.md
1026- cat << EOF > config.toml
1027- [ChainlinkImage]
1028- version="${{ env.VERSION }}"
1029- [Common]
1030- user="${{ github.actor }}"
1031- internal_docker_repo = "${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com"
1032- EOF
1033- # shellcheck disable=SC2002
1034- BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0)
1035- # shellcheck disable=SC2086
1036- echo ::add-mask::$BASE64_CONFIG_OVERRIDE
1037- # shellcheck disable=SC2086
1038- echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
1039- - name : Run Tests
1040- uses : smartcontractkit/.github/actions/ctf-run-tests@ctf-run-tests/0.11.0
1041- env :
1042- E2E_TEST_CHAINLINK_IMAGE : ${{ env.CHAINLINK_IMAGE }}
1043- E2E_TEST_SOLANA_SECRET : thisisatestingonlysecret
1044- CHAINLINK_USER_TEAM : " BIX"
1045- with :
1046- test_command_to_run : export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get-solana-sha.outputs.sha }} && make test_smoke
1047- test_config_override_base64 : ${{ env.BASE64_CONFIG_OVERRIDE }}
1048- cl_repo : ${{ env.CHAINLINK_IMAGE }}
1049- cl_image_tag : test-${{ inputs.evm-ref || env.CHAINLINK_REF }}
1050- publish_check_name : Solana Smoke Test Results
1051- go_mod_path : ./integration-tests/go.mod
1052- cache_key_id : core-solana-e2e-${{ env.MOD_CACHE_VERSION }}
1053- token : ${{ secrets.GITHUB_TOKEN }}
1054- aws_registries : ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
1055- artifacts_name : solana-test-artifacts
1056- artifacts_location : |
1057- ./integration-tests/smoke/logs
1058- ./integration-tests/smoke/db_dumps
1059- ./integration-tests/smoke/seth_artifacts
1060- /tmp/gotest.log
1061- QA_AWS_REGION : ${{ secrets.QA_AWS_REGION }}
1062- QA_AWS_ROLE_TO_ASSUME : ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
1063- run_setup : false
1064- go_coverage_src_dir : /var/tmp/go-coverage
1065- go_coverage_dest_dir : ${{ github.workspace }}/.covdata
1066-
1067- - name : Upload Coverage Data
1068- uses : actions/upload-artifact@v4
1069- timeout-minutes : 2
1070- continue-on-error : true
1071- with :
1072- name : cl_node_coverage_data_solana_tests
1073- path : .covdata
1074- retention-days : 1
858+ uses : smartcontractkit/chainlink-solana/.github/workflows/e2e_custom_cl_reusable.yml@f2205f8506c7441d805fa779a198b52163a05bfd
859+ with :
860+ solana_ref : ${{ needs.get-solana-sha.outputs.sha }}
861+ ecr_repository : ${{ inputs.ecr_name || 'chainlink-integration-tests' }}
862+ image_tag : ${{ inputs.evm-ref || inputs.cl_ref || github.sha }}
863+ secrets :
864+ aws_account_id : ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
865+ aws_region : ${{ secrets.QA_AWS_REGION }}
866+ aws_role_to_assume : ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
1075867
1076868 notify-test-failure :
1077869 name : Notify Test Failure
1078870 # TODO: uncomment this when we want to notify on test failures post-merge, if Phase 3 is necessary
1079871 if : false
1080872 # if: ${{ github.ref_name == 'develop' && failure() }}
1081- needs : [check-e2e-test-results, solana-smoke-tests]
873+ needs : [check-e2e-test-results, run- solana-smoke-tests]
1082874 runs-on : ubuntu-latest
1083875 steps :
1084876 - name : Send slack notification for failed migration tests
0 commit comments