From 4152a57e515f8162e0d4fdb22685229f12713cb2 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Mon, 13 Oct 2025 21:15:46 +0800 Subject: [PATCH 01/15] add github actions --- .github/workflows/test.yml | 149 +++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c3fac9b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,149 @@ +name: Test Programs + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: '1.82' + override: true + + - name: Install Solana CLI + run: | + sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" + echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + + - name: Install Anchor CLI + run: | + cargo install --git https://github.com/coral-xyz/anchor avm --locked --force + avm install 0.31.1 + avm use 0.31.1 + echo "$HOME/.avm/bin" >> $GITHUB_PATH + + - name: Install MagicBlock Ephemeral Validator + run: | + npm install -g @magicblock-labs/ephemeral-validator@latest + + - name: Configure Solana + run: | + solana config set --url localhost + solana-keygen new --no-bip39-passphrase --silent --outfile ~/.config/solana/id.json + + - name: Start Solana Test Validator + run: | + solana-test-validator \ + --ledger ./my-ledger-1 \ + --reset \ + --clone mAGicPQYBMvcYveUZA5F5UNNwyHvfYh5xkLS2Fr1mev \ + --clone EpJnX7ueXk7fKojBymqmVuCuwyhDQsYcLVL1XMsBbvDX \ + --clone 7JrkjmZPprHwtuvtuGTXp9hwfGYFAQLnLeFM52kqAgXg \ + --clone noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV \ + --clone-upgradeable-program DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh \ + --clone Cuj97ggrhhidhbu39TijNVqE74xvKJ69gDervRUXAxGh \ + --clone 5hBR571xnXppuCPveTrctfTU7tJLSN94nq7kv7FRK5Tc \ + --clone F72HqCR8nwYsVyeVd38pgKkjXmXFzVAM8rjZZsXWbdE \ + --clone vrfkfM4uoisXZQPrFiS2brY4oMkU9EWjyvmvqaFd5AS \ + --clone-upgradeable-program Vrf1RNUjXmQGjmQrQLvJHs9SNkvDJEsRVFPkfSQUwGz \ + --clone-upgradeable-program BTWAqWNBmF2TboMh3fxMJfgR16xGHYD7Kgr2dPwbRPBi \ + --url https://api.devnet.solana.com & + + # Wait for validator to be ready + timeout 30 bash -c 'until solana cluster-version --url http://localhost:8899 >/dev/null 2>&1; do sleep 1; done' + + - name: Start MagicBlock Ephemeral Validator + run: | + RUST_LOG=info ephemeral-validator \ + --accounts-lifecycle ephemeral \ + --remote-cluster development \ + --remote-url http://127.0.0.1:8899 \ + --remote-ws-url ws://127.0.0.1:8900 \ + --rpc-port 7799 & + + # Wait for validator to be ready + timeout 20 bash -c 'until curl -s http://localhost:7799 >/dev/null 2>&1; do sleep 1; done' + + - name: Build and Deploy anchor-counter + run: | + cd anchor-counter + anchor build && anchor deploy --provider.cluster localnet + + - name: Test anchor-counter + run: | + cd anchor-counter + EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + PROVIDER_ENDPOINT=http://localhost:8899 \ + WS_ENDPOINT=http://localhost:8900 \ + anchor test + + # - name: Test anchor-minter + # run: | + # cd anchor-minter + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # anchor test + + # - name: Test anchor-rock-paper-scissor + # run: | + # cd anchor-rock-paper-scissor + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # anchor test + + # - name: Test bolt-counter + # run: | + # cd bolt-counter + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # yarn test + + # - name: Test dummy-token-transfer + # run: | + # cd dummy-token-transfer + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # anchor test + + # - name: Test roll-dice + # run: | + # cd roll-dice + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # anchor test + + # - name: Test rust-counter + # run: | + # cd rust-counter + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # yarn test From a63c0b72edfcdf3146cd8602205171f59be8c1ab Mon Sep 17 00:00:00 2001 From: fauxfire Date: Mon, 13 Oct 2025 21:21:50 +0800 Subject: [PATCH 02/15] edit --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3fac9b..1d5bae1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test Programs +name: Test Examples on: push: @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - test: + Build and Test: runs-on: ubuntu-latest steps: @@ -64,6 +64,9 @@ jobs: - name: Start MagicBlock Ephemeral Validator run: | + # Increase file descriptor limit for the current session + ulimit -n 1000000 + RUST_LOG=info ephemeral-validator \ --accounts-lifecycle ephemeral \ --remote-cluster development \ From 152af1045d02f2e7b941ac346ee267ae26fd1c6e Mon Sep 17 00:00:00 2001 From: fauxfire Date: Mon, 13 Oct 2025 21:23:24 +0800 Subject: [PATCH 03/15] typo --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d5bae1..9682ac8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - Build and Test: + test-examples: runs-on: ubuntu-latest steps: From 76ad695ad6a2e70a4f0425c6c562520d5b3e5138 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Mon, 13 Oct 2025 21:38:13 +0800 Subject: [PATCH 04/15] ulimit fix --- .github/workflows/test.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9682ac8..da7ef7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,17 +20,15 @@ jobs: toolchain: '1.82' override: true - - name: Install Solana CLI + - name: Install Solana run: | - sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" - echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + sh -c "$(curl -sSfL https://release.anza.xyz/v2.1.21/install)" - - name: Install Anchor CLI + - name: Install Anchor run: | cargo install --git https://github.com/coral-xyz/anchor avm --locked --force avm install 0.31.1 avm use 0.31.1 - echo "$HOME/.avm/bin" >> $GITHUB_PATH - name: Install MagicBlock Ephemeral Validator run: | @@ -61,12 +59,13 @@ jobs: # Wait for validator to be ready timeout 30 bash -c 'until solana cluster-version --url http://localhost:8899 >/dev/null 2>&1; do sleep 1; done' - - - name: Start MagicBlock Ephemeral Validator + + - name: Increase file descriptor limit run: | - # Increase file descriptor limit for the current session ulimit -n 1000000 + - name: Start MagicBlock Ephemeral Validator + run: | RUST_LOG=info ephemeral-validator \ --accounts-lifecycle ephemeral \ --remote-cluster development \ From f9945b73b4fa84988300ccdfedc3b562932255c6 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Mon, 13 Oct 2025 21:42:21 +0800 Subject: [PATCH 05/15] path fix --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da7ef7d..05ca9c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,7 @@ jobs: - name: Install Solana run: | sh -c "$(curl -sSfL https://release.anza.xyz/v2.1.21/install)" + echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Install Anchor run: | From dd35f1488e348772e9624513d3a7a4040e192811 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Mon, 13 Oct 2025 21:43:03 +0800 Subject: [PATCH 06/15] anchor path --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05ca9c9..2e93ebc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,6 +30,7 @@ jobs: cargo install --git https://github.com/coral-xyz/anchor avm --locked --force avm install 0.31.1 avm use 0.31.1 + echo "$HOME/.avm/bin" >> $GITHUB_PATH - name: Install MagicBlock Ephemeral Validator run: | From 9cc508bf50468e8b51fad891f3530bf3de540010 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 01:15:10 +0800 Subject: [PATCH 07/15] change ulimit approach --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e93ebc..25e8dc2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -62,13 +62,13 @@ jobs: # Wait for validator to be ready timeout 30 bash -c 'until solana cluster-version --url http://localhost:8899 >/dev/null 2>&1; do sleep 1; done' - - name: Increase file descriptor limit - run: | - ulimit -n 1000000 - - name: Start MagicBlock Ephemeral Validator run: | - RUST_LOG=info ephemeral-validator \ + sudo prlimit --pid $$ --nofile=1048576:1048576 + sudo sysctl fs.inotify.max_user_instances=1280 + sudo sysctl fs.inotify.max_user_watches=655360 + + RUST_LOG=info ephemeral-validator \ --accounts-lifecycle ephemeral \ --remote-cluster development \ --remote-url http://127.0.0.1:8899 \ From f64efba952e7acade2bf2edf74ad0b27ff00a2c5 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 01:18:19 +0800 Subject: [PATCH 08/15] oops --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 25e8dc2..4eaba8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,7 +61,6 @@ jobs: # Wait for validator to be ready timeout 30 bash -c 'until solana cluster-version --url http://localhost:8899 >/dev/null 2>&1; do sleep 1; done' - - name: Start MagicBlock Ephemeral Validator run: | sudo prlimit --pid $$ --nofile=1048576:1048576 From 5489da1326d272e693c8ec7caa6f72b0c1998678 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 01:23:26 +0800 Subject: [PATCH 09/15] take2 --- .github/workflows/test.yml | 74 +++++--------------------------------- 1 file changed, 8 insertions(+), 66 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4eaba8d..3e9382e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,6 +43,11 @@ jobs: - name: Start Solana Test Validator run: | + # Increase resource limits BEFORE starting the validator + sudo prlimit --pid $$ --nofile=1048576:1048576 + sudo sysctl fs.inotify.max_user_instances=1280 + sudo sysctl fs.inotify.max_user_watches=655360 + solana-test-validator \ --ledger ./my-ledger-1 \ --reset \ @@ -61,13 +66,10 @@ jobs: # Wait for validator to be ready timeout 30 bash -c 'until solana cluster-version --url http://localhost:8899 >/dev/null 2>&1; do sleep 1; done' + - name: Start MagicBlock Ephemeral Validator run: | - sudo prlimit --pid $$ --nofile=1048576:1048576 - sudo sysctl fs.inotify.max_user_instances=1280 - sudo sysctl fs.inotify.max_user_watches=655360 - - RUST_LOG=info ephemeral-validator \ + RUST_LOG=info ephemeral-validator \ --accounts-lifecycle ephemeral \ --remote-cluster development \ --remote-url http://127.0.0.1:8899 \ @@ -89,64 +91,4 @@ jobs: EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ PROVIDER_ENDPOINT=http://localhost:8899 \ WS_ENDPOINT=http://localhost:8900 \ - anchor test - - # - name: Test anchor-minter - # run: | - # cd anchor-minter - # yarn install - # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - # PROVIDER_ENDPOINT=http://localhost:8899 \ - # WS_ENDPOINT=http://localhost:8900 \ - # anchor test - - # - name: Test anchor-rock-paper-scissor - # run: | - # cd anchor-rock-paper-scissor - # yarn install - # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - # PROVIDER_ENDPOINT=http://localhost:8899 \ - # WS_ENDPOINT=http://localhost:8900 \ - # anchor test - - # - name: Test bolt-counter - # run: | - # cd bolt-counter - # yarn install - # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - # PROVIDER_ENDPOINT=http://localhost:8899 \ - # WS_ENDPOINT=http://localhost:8900 \ - # yarn test - - # - name: Test dummy-token-transfer - # run: | - # cd dummy-token-transfer - # yarn install - # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - # PROVIDER_ENDPOINT=http://localhost:8899 \ - # WS_ENDPOINT=http://localhost:8900 \ - # anchor test - - # - name: Test roll-dice - # run: | - # cd roll-dice - # yarn install - # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - # PROVIDER_ENDPOINT=http://localhost:8899 \ - # WS_ENDPOINT=http://localhost:8900 \ - # anchor test - - # - name: Test rust-counter - # run: | - # cd rust-counter - # yarn install - # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - # PROVIDER_ENDPOINT=http://localhost:8899 \ - # WS_ENDPOINT=http://localhost:8900 \ - # yarn test + anchor test \ No newline at end of file From 487ad3431d161baf771ea9d923c5150b9fd502c6 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 01:28:34 +0800 Subject: [PATCH 10/15] same step --- .github/workflows/test.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e9382e..f9f4a83 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,11 +43,6 @@ jobs: - name: Start Solana Test Validator run: | - # Increase resource limits BEFORE starting the validator - sudo prlimit --pid $$ --nofile=1048576:1048576 - sudo sysctl fs.inotify.max_user_instances=1280 - sudo sysctl fs.inotify.max_user_watches=655360 - solana-test-validator \ --ledger ./my-ledger-1 \ --reset \ @@ -69,6 +64,10 @@ jobs: - name: Start MagicBlock Ephemeral Validator run: | + sudo prlimit --pid $$ --nofile=1048576:1048576 + sudo sysctl fs.inotify.max_user_instances=1280 + sudo sysctl fs.inotify.max_user_watches=655360 + RUST_LOG=info ephemeral-validator \ --accounts-lifecycle ephemeral \ --remote-cluster development \ From c91c58423d418f8c056045bdde4142eafa1e90a2 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 01:39:05 +0800 Subject: [PATCH 11/15] almost there --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9f4a83..5a89d2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,6 +64,7 @@ jobs: - name: Start MagicBlock Ephemeral Validator run: | + # Magic voodoo to increase resource limits sudo prlimit --pid $$ --nofile=1048576:1048576 sudo sysctl fs.inotify.max_user_instances=1280 sudo sysctl fs.inotify.max_user_watches=655360 @@ -90,4 +91,4 @@ jobs: EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ PROVIDER_ENDPOINT=http://localhost:8899 \ WS_ENDPOINT=http://localhost:8900 \ - anchor test \ No newline at end of file + anchor test --provider.cluster localnet \ No newline at end of file From d84f04134f650b826375524e92ee520a69113f4e Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 01:51:44 +0800 Subject: [PATCH 12/15] take3 --- .github/workflows/test.yml | 74 ++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a89d2e..8bc7379 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: --remote-cluster development \ --remote-url http://127.0.0.1:8899 \ --remote-ws-url ws://127.0.0.1:8900 \ - --rpc-port 7799 & + --rpc-port 7799 # Wait for validator to be ready timeout 20 bash -c 'until curl -s http://localhost:7799 >/dev/null 2>&1; do sleep 1; done' @@ -87,8 +87,70 @@ jobs: - name: Test anchor-counter run: | cd anchor-counter - EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - PROVIDER_ENDPOINT=http://localhost:8899 \ - WS_ENDPOINT=http://localhost:8900 \ - anchor test --provider.cluster localnet \ No newline at end of file + EPHEMERAL_PROVIDER_ENDPOINT="http://localhost:7799" \ + EPHEMERAL_WS_ENDPOINT="ws://localhost:7800" \ + anchor test \ + --provider.cluster localnet \ + --skip-local-validator \ + --skip-build \ + --skip-deploy + + # - name: Test anchor-minter + # run: | + # cd anchor-minter + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # anchor test + + # - name: Test anchor-rock-paper-scissor + # run: | + # cd anchor-rock-paper-scissor + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # anchor test + + # - name: Test bolt-counter + # run: | + # cd bolt-counter + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # yarn test + + # - name: Test dummy-token-transfer + # run: | + # cd dummy-token-transfer + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # anchor test + + # - name: Test roll-dice + # run: | + # cd roll-dice + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # anchor test + + # - name: Test rust-counter + # run: | + # cd rust-counter + # yarn install + # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ + # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ + # PROVIDER_ENDPOINT=http://localhost:8899 \ + # WS_ENDPOINT=http://localhost:8900 \ + # yarn test From 01cb458346fe02efff180b1dcdc35a4aad1a1c3a Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 02:00:12 +0800 Subject: [PATCH 13/15] oops --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8bc7379..bd11911 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,7 @@ jobs: --remote-cluster development \ --remote-url http://127.0.0.1:8899 \ --remote-ws-url ws://127.0.0.1:8900 \ - --rpc-port 7799 + --rpc-port 7799 & # Wait for validator to be ready timeout 20 bash -c 'until curl -s http://localhost:7799 >/dev/null 2>&1; do sleep 1; done' From 4d0c0e3a42dec51f62bd13d311f027e77094de0e Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 02:17:07 +0800 Subject: [PATCH 14/15] yarn --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bd11911..70561ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,6 +87,7 @@ jobs: - name: Test anchor-counter run: | cd anchor-counter + yarn install EPHEMERAL_PROVIDER_ENDPOINT="http://localhost:7799" \ EPHEMERAL_WS_ENDPOINT="ws://localhost:7800" \ anchor test \ From 040cfa3b0ac69177fe79edd86a2731023c2ae634 Mon Sep 17 00:00:00 2001 From: fauxfire Date: Thu, 16 Oct 2025 02:55:18 +0800 Subject: [PATCH 15/15] test --- .github/workflows/test.yml | 41 ++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70561ba..4bbaad1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,43 +78,36 @@ jobs: # Wait for validator to be ready timeout 20 bash -c 'until curl -s http://localhost:7799 >/dev/null 2>&1; do sleep 1; done' - - - name: Build and Deploy anchor-counter - run: | - cd anchor-counter - anchor build && anchor deploy --provider.cluster localnet - name: Test anchor-counter run: | cd anchor-counter + anchor build && anchor deploy --provider.cluster localnet yarn install EPHEMERAL_PROVIDER_ENDPOINT="http://localhost:7799" \ EPHEMERAL_WS_ENDPOINT="ws://localhost:7800" \ + PROVIDER_ENDPOINT=http://localhost:8899 \ + WS_ENDPOINT=http://localhost:8900 \ anchor test \ --provider.cluster localnet \ --skip-local-validator \ - --skip-build \ --skip-deploy - # - name: Test anchor-minter - # run: | - # cd anchor-minter - # yarn install - # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - # PROVIDER_ENDPOINT=http://localhost:8899 \ - # WS_ENDPOINT=http://localhost:8900 \ - # anchor test + - name: Test anchor-minter + run: | + cd anchor-minter + anchor build && anchor deploy --provider.cluster localnet + yarn install + anchor test \ + --skip-deploy - # - name: Test anchor-rock-paper-scissor - # run: | - # cd anchor-rock-paper-scissor - # yarn install - # EPHEMERAL_PROVIDER_ENDPOINT=http://localhost:7799 \ - # EPHEMERAL_WS_ENDPOINT=ws://localhost:7800 \ - # PROVIDER_ENDPOINT=http://localhost:8899 \ - # WS_ENDPOINT=http://localhost:8900 \ - # anchor test + - name: Test anchor-rock-paper-scissor + run: | + cd anchor-rock-paper-scissor + anchor build + yarn install + anchor test \ + --skip-deploy # - name: Test bolt-counter # run: |