Skip to content

Token pools

Token pools #2148

Workflow file for this run

name: Run TON Smoke Tests
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 3 * * *" # runs each night at 03:00 UTC
jobs:
run-ton-smoke-tests:
name: Run TON Smoke Tests in Chainlink CCIP
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- name: Set Chainlink version
id: set-version-chainlink
run: |
# Default to the pinned version for PRs
CHAINLINK_VERSION=$(cat ./scripts/.core_version | tr -d '[:space:]')
# If this is a scheduled (nightly) run, switch to develop
if [[ "${{ github.event_name }}" == "schedule" ]]; then
CHAINLINK_VERSION="develop"
fi
echo "chainlink_version=$CHAINLINK_VERSION" >> "$GITHUB_OUTPUT"
- name: Set Chainlink TON version
id: set-version-chainlink-ton
run: |
# Default to the pinned version for PRs
CHAINLINK_TON_VERSION=$(cat ./scripts/.chainlink-ton_version | tr -d '[:space:]')
# Use the pinned version by default.
# For PRs, use the PR head branch.
# For scheduled runs, use the current repository SHA from the default branch.
# If the pinned version file is empty, also fall back to the current ref/SHA.
if [[ "${{ github.event_name }}" == "schedule" || -z "$CHAINLINK_TON_VERSION" ]]; then
CHAINLINK_TON_VERSION="${{ github.head_ref || github.sha }}"
fi
echo "chainlink-ton_version=$CHAINLINK_TON_VERSION" >> "$GITHUB_OUTPUT"
- name: Setup GitHub Token
id: setup-github-token
uses: smartcontractkit/.github/actions/setup-github-token@setup-github-token/1.0.0
with:
aws-role-arn: ${{ secrets.AWS_ROLE_ARN_WORKFLOWS_CHAINLINKCCIP }}
aws-lambda-url: ${{ secrets.AWS_LAMBDA_URL_GATI_CHAINLINKCCIP }}
aws-region: ${{ vars.AWS_REGION }}
aws-role-duration-seconds: "1800"
- name: Trigger Chainlink CCIP TON Smoke Tests
env:
GH_TOKEN: ${{ steps.setup-github-token.outputs.access-token }}
WORKFLOW_FILE: .github/workflows/test_smoke.yml
TARGET_REPO: smartcontractkit/chainlink-ccip
TARGET_BRANCH: main
TON_REF: ${{ steps.set-version-chainlink-ton.outputs.chainlink-ton_version }}
CHAINLINK_VERSION: ${{ steps.set-version-chainlink.outputs.chainlink_version }}
CUSTOM_CONFIG: env.toml,env-cl-rebuild-ci.toml,../chainlink-ton/devenv/ton.toml
CONTRACT_VERSION: local
run: |
set -euo pipefail
OUTPUT=$(gh workflow run "${WORKFLOW_FILE}" \
--repo "${TARGET_REPO}" \
--ref "${TARGET_BRANCH}" \
--field "ton_ref=${TON_REF}" \
--field "chainlink_version=${CHAINLINK_VERSION}" \
--field "contract_version=${CONTRACT_VERSION}" \
--field "custom_config=${CUSTOM_CONFIG}")
echo "$OUTPUT"
RUN_ID=$(printf '%s\n' "$OUTPUT" \
| grep -Eo 'https://github.com/[^ ]+/actions/runs/[0-9]+' \
| grep -Eo '[0-9]+' \
| tail -n 1)
if [[ -z "${RUN_ID:-}" ]]; then
echo "Failed to parse workflow run ID from gh workflow run output"
exit 1
fi
echo "Triggered workflow run: https://github.com/${TARGET_REPO}/actions/runs/${RUN_ID}"
gh run watch \
--repo "${TARGET_REPO}" \
"$RUN_ID" \
--exit-status