Return MCMS proof for accept_ownership operations #140
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.57.2 | |
- test_name: Test_CCIP_Messaging_EVM2Sui | |
sui_version: mainnet-v1.57.2 | |
- test_name: Test_CCIPTokenTransfer_Sui2EVM | |
sui_version: mainnet-v1.57.2 | |
- test_name: Test_CCIPTokenTransfer_EVM2SUI | |
sui_version: mainnet-v1.57.2 | |
env: | |
DEFAULT_CORE_REF: develop | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_PAT_READ: ${{ secrets.GH_PAT_READ }} | |
GOPRIVATE: github.com/smartcontractkit/chainlink-sui | |
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: | |
# 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) Configure Git for private modules | |
- name: Configure Git & GOPRIVATE | |
run: | | |
git config --global url."https://${GH_PAT_READ}@github.com/".insteadOf "https://github.com/" | |
echo "GOPRIVATE=github.com/smartcontractkit/*" >> $GITHUB_ENV | |
env: | |
GH_PAT_READ: ${{ secrets.GH_PAT_READ }} | |
# 5) Cache Go modules | |
- name: Cache Go modules & build cache | |
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- | |
# 6) 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 | |
# 7) Build LOOP plugin | |
- name: Build LOOP plugin | |
working-directory: temp/chainlink-sui | |
run: go build -o chainlink-sui ./relayer/cmd/chainlink-sui/main.go | |
# 8) Setup Sui CLI using your reusable composite action | |
- name: Setup Sui CLI | |
uses: ./temp/chainlink-sui/.github/actions/setup-sui | |
with: | |
version: ${{ matrix.sui_version }} | |
# 9) Wait for Postgres | |
- name: Wait for Postgres | |
run: | | |
until pg_isready -h localhost -U postgres; do sleep 1; done | |
# 10) Prepare DB | |
- name: Prepare database | |
run: | | |
cd temp/chainlink | |
make testdb | |
# 11) Run the integration test (isolated per job) | |
- 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 4 \ | |
-count=1 \ | |
-v | |
# 12) 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 |