update mcms in deployment #1765
Workflow file for this run
This file contains hidden or 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: CCIP Integration Test | |
| on: | |
| push: | |
| branches: [develop, main] | |
| pull_request: | |
| types: [opened, synchronize, reopened, edited] | |
| concurrency: | |
| group: ccip-tests-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ccip_test_sui2evm: | |
| name: Run Sui <-> EVM Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - test_name: Test_CCIP_Messaging_Sui2EVM | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIP_Messaging_EVM2Sui | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIP_EVM2Sui_ZeroReceiver | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIPTokenTransfer_Sui2EVM_LockReleaseTokenPool | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIPTokenTransfer_Sui2EVM_BurnMintTokenPool | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIPTokenTransfer_Sui2EVM_BurnMintTokenPool_WithRateLimit | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIPTokenTransfer_Sui2EVM_BurnMintTokenPool_WithAllowlist | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIPTokenTransfer_Sui2EVM_BurnMintTokenPool_ThenGloballyCursedUncursed | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIPTokenTransfer_Sui2EVM_ManagedTokenPool_ThenCurseUncurse | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIPTokenTransfer_SUI2EVM_ManagedTokenPool_WithRateLimit | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIP_Upgrade_Sui2EVM | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIP_Upgrade_EVM2Sui | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIP_Upgrade_CommonPkg_EVM2Sui | |
| sui_version: mainnet-v1.67.3 | |
| - test_name: Test_CCIP_Upgrade_NoBlock_EVM2Sui | |
| sui_version: mainnet-v1.67.3 | |
| # - test_name: Test_CCIPTokenTransfer_EVM2SUI_BurnMintTokenPool | |
| # sui_version: mainnet-v1.57.2 | |
| # - test_name: Test_CCIPPureTokenTransfer_EVM2SUI_BurnMintTokenPool | |
| # sui_version: mainnet-v1.57.2 | |
| # - test_name: Test_CCIPProgrammableTokenTransfer_EVM2SUI_BurnMintTokenPool | |
| # sui_version: mainnet-v1.57.2 | |
| # - test_name: Test_CCIPZeroGasLimitTokenTransfer_EVM2SUI_BurnMintTokenPool | |
| # sui_version: mainnet-v1.57.2 | |
| env: | |
| DEFAULT_CORE_REF: develop | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CL_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/chainlink_test?sslmode=disable | |
| services: | |
| postgres: | |
| image: postgres:15.1-alpine | |
| ports: | |
| - 5432:5432 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: chainlink_test | |
| options: >- | |
| --health-cmd="pg_isready -U postgres" | |
| --health-interval=5s | |
| --health-timeout=2s | |
| --health-retries=5 | |
| steps: | |
| # 0) Free up disk space | |
| - name: Free Disk Space | |
| run: | | |
| echo "Disk space before cleanup:" | |
| df -h | |
| # Remove unnecessary software | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /usr/local/lib/android | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune --all --force | |
| echo "Disk space after cleanup:" | |
| df -h | |
| # 1) Checkout both repos | |
| - name: Checkout chainlink-sui | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.repository }} | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| path: temp/chainlink-sui | |
| fetch-depth: 1 | |
| # 1.5) Get core ref from PR body (optional override) | |
| - name: Get core ref from PR body | |
| if: 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}" | |
| fi | |
| - name: Checkout chainlink | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: smartcontractkit/chainlink | |
| ref: ${{ env.CUSTOM_CORE_REF || env.DEFAULT_CORE_REF }} | |
| path: temp/chainlink | |
| fetch-depth: 1 | |
| # 2) Read Go version | |
| - name: Read Go version | |
| id: go-version | |
| run: | | |
| GO_VER=$(grep -E '^golang ' temp/chainlink/.tool-versions | cut -d' ' -f2) | |
| echo "GO_VERSION=$GO_VER" >> $GITHUB_OUTPUT | |
| # 3) Set up Go | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ steps.go-version.outputs.GO_VERSION }} | |
| cache: true | |
| # 4) Cache Go modules | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| id: cache-go | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-mods-${{ hashFiles('temp/chainlink/go.sum','temp/chainlink-sui/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-mods- | |
| # 5) Pin & tidy the core module | |
| - name: Fetch & pin chainlink-sui (and deployment) | |
| run: | | |
| # Determine which ref of chainlink-sui to use | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| REF="${{ github.event.pull_request.head.sha }}" | |
| else | |
| REF="${{ github.sha }}" | |
| fi | |
| echo "Using chainlink-sui ref: $REF" | |
| cd temp/chainlink | |
| go get github.com/smartcontractkit/chainlink-sui@$REF | |
| cd deployment | |
| go get github.com/smartcontractkit/chainlink-sui/deployment@$REF | |
| cd .. | |
| make gomodtidy | |
| # 6) Build LOOP plugin | |
| - name: Build LOOP plugin | |
| working-directory: temp/chainlink-sui | |
| run: go build -o chainlink-sui ./relayer/cmd/chainlink-sui/main.go | |
| # 7) Setup Sui CLI | |
| - name: Setup Sui CLI | |
| uses: ./temp/chainlink-sui/.github/actions/setup-sui | |
| with: | |
| version: ${{ matrix.sui_version }} | |
| # 8) Wait for Postgres | |
| - name: Wait for Postgres | |
| run: | | |
| until pg_isready -h localhost -U postgres; do sleep 1; done | |
| # 9) Prepare DB | |
| - name: Prepare database | |
| run: | | |
| cd temp/chainlink | |
| make testdb | |
| # 10) Run the integration test | |
| - name: Run ${{ matrix.test_name }} | |
| env: | |
| CL_DATABASE_URL: ${{ env.CL_DATABASE_URL }} | |
| TEST_ENV_TYPE: in-memory | |
| CL_SUI_CMD: ${{ github.workspace }}/temp/chainlink-sui/chainlink-sui | |
| run: | | |
| cd temp/chainlink/integration-tests | |
| echo "=== Running ${{ matrix.test_name }} ===" | |
| go test ./smoke/ccip \ | |
| -run "${{ matrix.test_name }}" \ | |
| -timeout 20m \ | |
| -parallel 1 \ | |
| -count=1 \ | |
| -v | |
| # 11) Upload test artifacts | |
| - name: Upload Sui test artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sui-ccip-test-artifacts-${{ matrix.test_name }} | |
| path: temp/chainlink/integration-tests/smoke/ccip/logs | |
| retention-days: 2 |