diff --git a/.github/workflows/ccip-integration-test.yml b/.github/workflows/ccip-integration-test.yml index 47f7673a9..0b1087155 100644 --- a/.github/workflows/ccip-integration-test.yml +++ b/.github/workflows/ccip-integration-test.yml @@ -5,7 +5,7 @@ on: merge_group: push: branches: - - 'main' + - "main" jobs: changes: @@ -36,47 +36,82 @@ jobs: # We explicitly have this env var not be "CL_DATABASE_URL" to avoid having it be used by core related tests # when they should not be using it, while still allowing us to DRY up the setup DB_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable - + strategy: fail-fast: false matrix: type: - - cmd: cd integration-tests/smoke/ccip && go test ccip_fees_test.go -timeout 12m -test.parallel=2 -count=1 -json - name: "Fees Test" - - cmd: cd integration-tests/smoke/ccip && go test -run "TestTokenTransfer_EVM2EVM" ccip_token_transfer_test.go -timeout 12m -test.parallel=1 -count=1 -json - name: "Token Transfer Test" - - cmd: cd integration-tests/smoke/ccip && go test ccip_usdc_test.go -timeout 12m -test.parallel=1 -count=1 -json - name: "USDC Test" - - cmd: cd integration-tests/smoke/ccip && go test ccip_ooo_execution_test.go -timeout 12m -test.parallel=1 -count=1 -json - name: "OOO Execution Test" - - cmd: cd integration-tests/smoke/ccip && go test -run "^Test_CCIPMessaging_EVM2EVM$" ccip_messaging_test.go -timeout 20m -test.parallel=2 -count=1 -json - name: "Messaging Test Test_CCIPMessaging_EVM2EVM" - - cmd: cd integration-tests/smoke/ccip && go test -run "^Test_CCIPMessaging_EVM2Solana$" ccip_messaging_test.go -timeout 30m -test.parallel=2 -count=1 -json - name: "Messaging Test Test_CCIPMessaging_EVM2Solana" - - cmd: cd integration-tests/smoke/ccip && go test -run "^Test_CCIPMessaging_Solana2EVM$" ccip_messaging_test.go -timeout 30m -test.parallel=2 -count=1 -json - name: "Messaging Test Test_CCIPMessaging_Solana2EVM" - - cmd: cd integration-tests/smoke/ccip && go test -run "^Test_CCIPMessaging_EVM2SolanaMultiExecReports$" ccip_messaging_test.go -timeout 35m -test.parallel=1 -count=1 -json - name: "Messaging Test Test_CCIPMessaging_EVM2SolanaMultiExecReports" - - cmd: cd integration-tests/smoke/ccip && go test -run "Test_CCIPBatching_MaxBatchSizeEVM" ccip_batching_test.go -timeout 12m -test.parallel=1 -count=1 -json - name: "Batching Test Test_CCIPBatching_MaxBatchSizeEVM" - - cmd: cd integration-tests/smoke/ccip && go test -run "^Test_CCIPBatching_MultiSource$" ccip_batching_test.go -timeout 12m -test.parallel=1 -count=1 -json - name: "Batching Test Test_CCIPBatching_MultiSource" - - cmd: cd integration-tests/smoke/ccip && go test -run "Test_CCIPBatching_MultiSource_MultiRoot" ccip_batching_test.go -timeout 12m -test.parallel=1 -count=1 -json - name: "Batching Test Test_CCIPBatching_MultiSource_MultiRoot" - - cmd: cd integration-tests/smoke/ccip && go test -run "^Test_CCIPBatching_SingleSource$" ccip_batching_test.go -timeout 12m -test.parallel=1 -count=1 -json - name: "Batching Test Test_CCIPBatching_SingleSource" - - cmd: cd integration-tests/smoke/ccip && go test -run "Test_CCIPBatching_SingleSource_MultiRoot" ccip_batching_test.go -timeout 12m -test.parallel=1 -count=1 -json - name: "Batching Test Test_CCIPBatching_SingleSource_MultiRoot" - - cmd: cd integration-tests/smoke/ccip && go test ccip_gas_price_updates_test.go -timeout 12m -test.parallel=2 -count=1 -json - name: "Gas Price Updates Test" + - name: "Fees Test" + file: ccip_fees_test.go + run: "" + timeout: 12m + # DEBUG: /home/runner/work/chainlink-ccip/chainlink-ccip/integration-tests/smoke/ccip/ccip_token_transfer_test.go: directory not found + - name: "Token Transfer Test" + file: ccip_token_transfer_test.go + run: "TestTokenTransfer_EVM2EVM" + timeout: 12m + - name: "USDC Test" + file: ccip_usdc_test.go + run: "" + timeout: 12m + - name: "OOO Execution Test" + file: ccip_ooo_execution_test.go + run: "" + timeout: 12m + - name: "Messaging Test Test_CCIPMessaging_EVM2EVM" + file: ccip_messaging_test.go + run: "^Test_CCIPMessaging_EVM2EVM$" + timeout: 20m + - name: "Messaging Test Test_CCIPMessaging_EVM2Solana" + file: ccip_messaging_test.go + run: "^Test_CCIPMessaging_EVM2Solana$" + timeout: 30m + - name: "Messaging Test Test_CCIPMessaging_Solana2EVM" + file: ccip_messaging_test.go + run: "^Test_CCIPMessaging_Solana2EVM$" + timeout: 30m + - name: "Messaging Test Test_CCIPMessaging_EVM2SolanaMultiExecReports" + file: ccip_messaging_test.go + run: "^Test_CCIPMessaging_EVM2SolanaMultiExecReports$" + timeout: 35m + - name: "Batching Test Test_CCIPBatching_MaxBatchSizeEVM" + file: ccip_batching_test.go + run: "Test_CCIPBatching_MaxBatchSizeEVM" + timeout: 12m + - name: "Batching Test Test_CCIPBatching_MultiSource" + file: ccip_batching_test.go + run: "^Test_CCIPBatching_MultiSource$" + timeout: 12m + - name: "Batching Test Test_CCIPBatching_MultiSource_MultiRoot" + file: ccip_batching_test.go + run: "Test_CCIPBatching_MultiSource_MultiRoot" + timeout: 12m + - name: "Batching Test Test_CCIPBatching_SingleSource" + file: ccip_batching_test.go + run: "^Test_CCIPBatching_SingleSource$" + timeout: 12m + - name: "Batching Test Test_CCIPBatching_SingleSource_MultiRoot" + file: ccip_batching_test.go + run: "Test_CCIPBatching_SingleSource_MultiRoot" + timeout: 12m + - name: "Gas Price Updates Test" + file: ccip_gas_price_updates_test.go + run: "" + timeout: 12m # TODO: this can only run in docker for now, switch to in-memory and uncomment - # - cmd: cd integration-tests/smoke/ccip && go test ccip_token_price_updates_test.go -timeout 12m -test.parallel=2 -count=1 -json - # name: "Token Price Updates Test" - - cmd: cd integration-tests/smoke/ccip && go test ccip_reader_test.go -timeout 5m -test.parallel=1 -count=1 -json - name: "CCIPReader Test" - - cmd: cd integration-tests/smoke/ccip && go test -run "^Test_CCIPTopologies_EVM2EVM_RoleDON_AllSupportSource_SomeSupportDest$" ccip_topologies_test.go -timeout 20m -test.parallel=2 -count=1 -json - name: "Test_CCIPTopologies_EVM2EVM_RoleDON_AllSupportSource_SomeSupportDest" - + # - name: "Token Price Updates Test" + # file: ccip_token_price_updates_test.go + # run: "" + # timeout: 12m + - name: "CCIPReader Test" + file: ccip_reader_test.go + run: "" + timeout: 5m + - name: "Test_CCIPTopologies_EVM2EVM_RoleDON_AllSupportSource_SomeSupportDest" + file: ccip_topologies_test.go + run: "^Test_CCIPTopologies_EVM2EVM_RoleDON_AllSupportSource_SomeSupportDest$" + timeout: 20m + name: Integration Tests (${{ matrix.type.name }}) runs-on: ubuntu-latest steps: @@ -217,9 +252,16 @@ jobs: go run github.com/smartcontractkit/chainlink/v2/core/store/cmd/preparetest env: CL_DATABASE_URL: ${{ env.DB_URL }} - - name: Run ${{ matrix.type.name }} - run: cd $GITHUB_WORKSPACE/chainlink/ && ${{ matrix.type.cmd }} + - name: ${{ matrix.type.name }} + # DEBUG: Using specific commit to figure out odd error + uses: smartcontractkit/.github/actions/branch-out-upload@fe886e79324fc84f7a721fcea6994b03f57660f8 + with: + trunk-org-slug: smartcontractkit + trunk-token: ${{ secrets.TRUNK_API_KEY }} + # Need to use -C to run the tests from the proper directory + go-test-args: ${{ matrix.type.run != '' && format('-run {0} ', matrix.type.run) || '' }}-timeout ${{ matrix.type.timeout }} ${{ matrix.type.file }} env: + GOFLAGS: -C=./chainlink/integration-tests/smoke/ccip CL_DATABASE_URL: ${{ env.DB_URL }} integration-test-ccip-ocr3: diff --git a/.github/workflows/test-deployments.yml b/.github/workflows/test-deployments.yml index d27643c21..a58e0b588 100644 --- a/.github/workflows/test-deployments.yml +++ b/.github/workflows/test-deployments.yml @@ -8,7 +8,7 @@ on: merge_group: push: branches: - - 'main' + - "main" jobs: detect_deployments_changes: @@ -60,8 +60,12 @@ jobs: working-directory: chains/evm/deployment steps: - uses: actions/checkout@v4 - - name: Run tests - run: go test ./... + - name: Test EVM Deployments + uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1 + with: + trunk-org-slug: smartcontractkit + trunk-token: ${{ secrets.TRUNK_API_KEY }} + go-test-args: ./chains/evm/deployment/... test-solana-deployments: needs: [detect_deployments_changes, setup-go] @@ -72,8 +76,12 @@ jobs: working-directory: chains/solana/deployment steps: - uses: actions/checkout@v4 - - name: Run tests - run: go test ./... + - name: Test Solana Deployments + uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1 + with: + trunk-org-slug: smartcontractkit + trunk-token: ${{ secrets.TRUNK_API_KEY }} + go-test-args: ./chains/solana/deployment/... test-deployments: needs: [detect_deployments_changes, setup-go] @@ -84,8 +92,12 @@ jobs: working-directory: deployment steps: - uses: actions/checkout@v4 - - name: Run tests - run: go test ./... + - name: Test Crosschain Deployments + uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1 + with: + trunk-org-slug: smartcontractkit + trunk-token: ${{ secrets.TRUNK_API_KEY }} + go-test-args: ./deployment/... test-deployments-crosschain: needs: [detect_deployments_changes, setup-go] @@ -105,5 +117,9 @@ jobs: run: | sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" # always use latest stable release from solana echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$PATH" >> $GITHUB_ENV - - name: Run tests - run: go test ./... + - name: Test Crosschain Deployments + uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1 + with: + trunk-org-slug: smartcontractkit + trunk-token: ${{ secrets.TRUNK_API_KEY }} + go-test-args: ./integration-tests/deployment/... diff --git a/.github/workflows/test_smoke.yml b/.github/workflows/test_smoke.yml index 4e8697a77..d8119e602 100644 --- a/.github/workflows/test_smoke.yml +++ b/.github/workflows/test_smoke.yml @@ -4,15 +4,15 @@ on: workflow_dispatch: inputs: ton_ref: - description: 'Git ref (branch) of the TON relayer' + description: "Git ref (branch) of the TON relayer" required: false type: string contract_version: - description: 'Version of CCIP contracts to use' + description: "Version of CCIP contracts to use" required: false type: string chainlink_version: - description: 'Chainlink version to use (e.g., develop, gh ref, etc.)' + description: "Chainlink version to use (e.g., develop, gh ref, etc.)" required: false type: string custom_config: @@ -22,7 +22,7 @@ on: pull_request: push: branches: - - 'main' + - "main" defaults: run: @@ -40,13 +40,13 @@ jobs: strategy: matrix: test: - - name: TestE2ESmoke - config: >- - ${{ - github.event_name == 'workflow_dispatch' && - ( inputs.custom_config != '' && inputs.custom_config || 'env.toml' ) - || 'env.toml' - }} + - name: TestE2ESmoke + config: >- + ${{ + github.event_name == 'workflow_dispatch' && + ( inputs.custom_config != '' && inputs.custom_config || 'env.toml' ) + || 'env.toml' + }} fail-fast: false steps: - name: Checkout code @@ -82,7 +82,7 @@ jobs: - name: Install Just uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 with: - just-version: '1.40.0' + just-version: "1.40.0" - name: Authenticate to AWS ECR uses: ./.github/actions/aws-ecr-auth with: @@ -120,7 +120,10 @@ jobs: cd cmd/ccip && go install . && cd - ccip u ${{ matrix.test.config }} sleep 120 # wait for nodes to be ready, need a better way here - - name: Run smoke test - working-directory: devenv/tests/e2e - run: | - go test -v -run ${{ matrix.test.name }} -timeout 20m + - name: Smoke Tests + # DEBUG: Using specific commit to figure out odd error + uses: smartcontractkit/.github/actions/branch-out-upload@fe886e79324fc84f7a721fcea6994b03f57660f8 + with: + trunk-org-slug: smartcontractkit + trunk-token: ${{ secrets.TRUNK_API_KEY }} + go-test-args: -run ${{ matrix.test.name }} -timeout 20m