SDP-1861: Replace Anchor Platform with internal wallet registration #2042
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: Integration Tests | |
| on: | |
| workflow_call: # allows this workflow to be called from another workflow, like `docker_image_public_release` | |
| pull_request: # TODO: Remove before merging. | |
| env: | |
| USER_EMAIL: "[email protected]" | |
| USER_PASSWORD: "mockPassword123!" | |
| DISTRIBUTION_PUBLIC_KEY: ${{ vars.DISTRIBUTION_PUBLIC_KEY }} | |
| DISTRIBUTION_SEED: ${{ vars.DISTRIBUTION_SEED }} | |
| CHANNEL_ACCOUNT_ENCRYPTION_PASSPHRASE: ${{ vars.DISTRIBUTION_SEED }} | |
| SEP10_SIGNING_PUBLIC_KEY: ${{ vars.SEP10_SIGNING_PUBLIC_KEY }} | |
| SEP10_SIGNING_PRIVATE_KEY: ${{ vars.SEP10_SIGNING_PRIVATE_KEY }} | |
| CIRCLE_API_KEY: ${{ vars.CIRCLE_API_KEY }} | |
| CIRCLE_USDC_WALLET_ID: ${{ vars.CIRCLE_USDC_WALLET_ID }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| e2e: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| max-parallel: 1 | |
| matrix: | |
| platform: | |
| - "Stellar-phone" # Stellar distribution account where receivers are registered with their phone number | |
| - "Stellar-phone-FUTURENET" # Stellar distribution account where receivers are registered with their phone number | |
| - "Stellar-phoneWallet" # Stellar distribution account where receivers are registered with their phone number and wallet address | |
| - "Stellar-email" # Stellar distribution account where receivers are registered with their email | |
| - "Circle-transfers-phone" # Circle(Transfers) distribution account where receivers are registered with their phone number | |
| - "Circle-payouts-phoneWallet" # Circle(Payouts) distribution account where receivers are registered with their phone number and wallet address | |
| include: | |
| - platform: "Stellar-phone" | |
| environment: "Receiver Registration - E2E Integration Tests (Stellar)" | |
| DISTRIBUTION_ACCOUNT_TYPE: "DISTRIBUTION_ACCOUNT.STELLAR.ENV" | |
| DISBURSEMENT_CSV_FILE_NAME: "disbursement_instructions_phone.csv" | |
| REGISTRATION_CONTACT_TYPE: "PHONE_NUMBER" | |
| DISBURSED_ASSET_CODE: "USDC" | |
| DISBURSED_ASSET_ISSUER: "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" | |
| - platform: "Stellar-phoneWallet" | |
| environment: "Receiver Registration - E2E Integration Tests (Stellar)" | |
| DISTRIBUTION_ACCOUNT_TYPE: "DISTRIBUTION_ACCOUNT.STELLAR.ENV" | |
| DISBURSEMENT_CSV_FILE_NAME: "disbursement_instructions_phone_with_wallet.csv" | |
| REGISTRATION_CONTACT_TYPE: "PHONE_NUMBER_AND_WALLET_ADDRESS" | |
| DISBURSED_ASSET_CODE: "USDC" | |
| DISBURSED_ASSET_ISSUER: "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" | |
| - platform: "Stellar-email" | |
| environment: "Receiver Registration - E2E Integration Tests (Stellar)" | |
| DISTRIBUTION_ACCOUNT_TYPE: "DISTRIBUTION_ACCOUNT.STELLAR.ENV" | |
| DISBURSEMENT_CSV_FILE_NAME: "disbursement_instructions_email.csv" | |
| REGISTRATION_CONTACT_TYPE: "EMAIL" | |
| DISBURSED_ASSET_CODE: "USDC" | |
| DISBURSED_ASSET_ISSUER: "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" | |
| - platform: "Circle-transfers-phone" | |
| environment: "Receiver Registration - E2E Integration Tests (Circle)" | |
| CIRCLE_API_TYPE: "TRANSFERS" | |
| DISTRIBUTION_ACCOUNT_TYPE: "DISTRIBUTION_ACCOUNT.CIRCLE.DB_VAULT" | |
| DISBURSEMENT_CSV_FILE_NAME: "disbursement_instructions_phone.csv" | |
| REGISTRATION_CONTACT_TYPE: "PHONE_NUMBER" | |
| DISBURSED_ASSET_CODE: "USDC" | |
| DISBURSED_ASSET_ISSUER: "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" | |
| - platform: "Circle-payouts-phoneWallet" | |
| environment: "Receiver Registration - E2E Integration Tests (Circle)" | |
| CIRCLE_API_TYPE: "PAYOUTS" | |
| DISTRIBUTION_ACCOUNT_TYPE: "DISTRIBUTION_ACCOUNT.CIRCLE.DB_VAULT" | |
| DISBURSEMENT_CSV_FILE_NAME: "disbursement_instructions_phone_with_wallet.csv" | |
| REGISTRATION_CONTACT_TYPE: "PHONE_NUMBER_AND_WALLET_ADDRESS" | |
| DISBURSED_ASSET_CODE: "USDC" | |
| DISBURSED_ASSET_ISSUER: "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" | |
| - platform: "Stellar-phone-FUTURENET" | |
| environment: "Receiver Registration - E2E Integration Tests (Stellar)" | |
| DISTRIBUTION_ACCOUNT_TYPE: "DISTRIBUTION_ACCOUNT.STELLAR.ENV" | |
| DISBURSEMENT_CSV_FILE_NAME: "disbursement_instructions_phone.csv" | |
| REGISTRATION_CONTACT_TYPE: "PHONE_NUMBER" | |
| DISBURSED_ASSET_CODE: "XLM" | |
| NETWORK_PASSPHRASE: "Test SDF Future Network ; October 2022" | |
| HORIZON_URL: "https://horizon-futurenet.stellar.org" | |
| environment: ${{ matrix.environment }} | |
| env: | |
| DISTRIBUTION_ACCOUNT_TYPE: ${{ matrix.DISTRIBUTION_ACCOUNT_TYPE }} | |
| DISBURSEMENT_CSV_FILE_NAME: ${{ matrix.DISBURSEMENT_CSV_FILE_NAME }} | |
| REGISTRATION_CONTACT_TYPE: ${{ matrix.REGISTRATION_CONTACT_TYPE }} | |
| DISBURSED_ASSET_CODE: ${{ matrix.DISBURSED_ASSET_CODE }} | |
| DISBURSED_ASSET_ISSUER: ${{ matrix.DISBURSED_ASSET_ISSUER }} | |
| NETWORK_PASSPHRASE: ${{ matrix.NETWORK_PASSPHRASE }} | |
| HORIZON_URL: ${{ matrix.HORIZON_URL }} | |
| CIRCLE_API_TYPE: ${{ matrix.CIRCLE_API_TYPE || 'TRANSFERS' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Cleanup data | |
| working-directory: internal/integrationtests/docker | |
| run: docker compose -f docker-compose-e2e-tests.yml down -v | |
| shell: bash | |
| - name: Run Docker Compose for SDP and TSS | |
| working-directory: internal/integrationtests/docker | |
| run: docker compose -f docker-compose-e2e-tests.yml up --build -V -d | |
| - name: Install curl | |
| run: sudo apt-get update && sudo apt-get install -y curl | |
| shell: bash | |
| - name: Wait for the SDP to be up | |
| run: | | |
| wait_for_server() { | |
| local endpoint=$1 | |
| local max_wait_time=$2 | |
| SECONDS=0 | |
| while ! curl -s $endpoint > /dev/null; do | |
| echo "Waiting for server at $endpoint to be up... $SECONDS seconds elapsed" | |
| sleep 4 | |
| if [ $SECONDS -ge $max_wait_time ]; then | |
| echo "Server at $endpoint is not up after $max_wait_time seconds." | |
| exit 1 | |
| fi | |
| done | |
| echo "Server at $endpoint is up." | |
| } | |
| wait_for_server http://localhost:8000/health 120 | |
| wait_for_server http://localhost:8003/health 120 | |
| shell: bash | |
| - name: Create integration test data | |
| run: | | |
| docker exec e2e-sdp-api sh -c "./stellar-disbursement-platform integration-tests create-data" | |
| shell: bash | |
| - name: Verify SEP endpoints configuration | |
| run: | | |
| echo "Checking stellar.toml configuration..." | |
| TOML=$(curl -s http://localhost:8000/.well-known/stellar.toml) | |
| echo "Verifying Internal SEP endpoints in stellar.toml..." | |
| if echo "$TOML" | grep -q "TRANSFER_SERVER.*8000"; then | |
| echo "✅ TOML correctly points to Internal SEP-24 endpoints" | |
| else | |
| echo "❌ TOML does not point to Internal endpoints" | |
| echo "$TOML" | |
| exit 1 | |
| fi | |
| shell: bash | |
| - name: Start integration test command | |
| run: | | |
| echo "Running integration tests with native SDP SEP services" | |
| docker exec e2e-sdp-api sh -c "./stellar-disbursement-platform integration-tests start" | |
| shell: bash | |
| - name: Docker logs | |
| if: always() | |
| working-directory: internal/integrationtests/docker | |
| run: docker compose -f docker-compose-e2e-tests.yml logs && docker compose -f docker-compose-e2e-tests.yml down | |
| shell: bash |