Staging - TON2EVM messaging test #1057
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: Staging - TON2EVM messaging test | |
permissions: | |
contents: read | |
on: | |
schedule: | |
# Runs at minute 0, 15, 30, and 45 of every hour | |
- cron: "*/15 * * * *" | |
pull_request: | |
types: [opened, synchronize, reopened, labeled] | |
branches: | |
- main | |
jobs: | |
messaging-test: | |
if: | | |
github.event_name == 'schedule' || | |
(github.event_name == 'pull_request' && | |
contains(github.event.pull_request.labels.*.name, 'run-staging-ton2evm-test')) | |
runs-on: ubuntu-latest | |
env: | |
RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
TRIGGER: "${{ github.event_name }}" | |
WHEN: "${{ github.run_started_at }}" # ISO8601 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f # v31 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- name: Run TON2EVM messaging test | |
run: | | |
pushd staging-messaging-test | |
nix develop -c ./run_test.sh \ | |
"${{ secrets.STAGING_TON_ROUTER_ADDRESS }}" \ | |
"${{ vars.STAGING_SEPOLIA_DEST_CHAIN_SELECTOR }}" \ | |
"${{ secrets.STAGING_EVM_RECEIVER_ADDRESS }}" \ | |
"${{ secrets.STAGING_TEST_SENDER_WALLET_SEED }}" \ | |
"hello-ton->evm-${{ github.run_id }}" \ | |
"${{ secrets.SEPOLIA_RPC_URL }}" | |
popd | |
- name: Send Slack notification (success) | |
if: success() | |
run: | | |
curl -X POST -H 'Content-type: application/json' \ | |
--data "{ | |
\"Status\": \":white_check_mark: Success\", | |
\"Router\": \"${{ secrets.STAGING_TON_ROUTER_ADDRESS }}\", | |
\"Receiver\": \"${{ secrets.STAGING_EVM_RECEIVER_ADDRESS }}\", | |
\"Data\": \"hello-ton->evm-${{ github.run_id }}\", | |
\"RunURL\": \"${RUN_URL}\", | |
\"Trigger\": \"${TRIGGER}\", | |
\"When\": \"${WHEN}\" | |
}" \ | |
${{ secrets.STAGING_TEST_SLACK_WEBHOOK }} | |
- name: Send Slack notification (failure) | |
if: failure() | |
run: | | |
curl -X POST -H 'Content-type: application/json' \ | |
--data "{ | |
\"Status\": \":x: Failure\", | |
\"Router\": \"${{ secrets.STAGING_TON_ROUTER_ADDRESS }}\", | |
\"Receiver\": \"${{ secrets.STAGING_EVM_RECEIVER_ADDRESS }}\", | |
\"Data\": \"hello-ton->evm-${{ github.run_id }}\", | |
\"RunURL\": \"${RUN_URL}\", | |
\"Trigger\": \"${TRIGGER}\", | |
\"When\": \"${WHEN}\" | |
}" \ | |
${{ secrets.STAGING_TEST_SLACK_WEBHOOK }} | |