Skip to content

Commit

Permalink
test: solana packages test on ci - check connection
Browse files Browse the repository at this point in the history
  • Loading branch information
jadepark-dev committed Aug 30, 2024
1 parent 5577f9d commit 0fe835e
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/solana-packages-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,22 @@ jobs:
extra_nix_config: "sandbox = false"

- name: Build and test solana-test-validator
run: nix run .#solana-test-validator

- name: Check if validator is running
run: |
nix run .#solana-test-validator &
sleep 10
if curl --fail http://127.0.0.1:8899; then
echo "Validator is running and accessible"
else
echo "Failed to connect to the validator"
exit 1
fi
for i in {1..10}; do
if curl --fail http://127.0.0.1:8899; then
echo "Localnet is running and accessible"
break
else
echo "Waiting for the localnet to start..."
sleep 3
fi
if [ $i -eq 30 ]; then
echo "Localnet did not start within the expected time."
exit 1
fi
- name: Build solana-cli-env
run: nix build .#solana-cli-env --print-out-paths
Expand Down

0 comments on commit 0fe835e

Please sign in to comment.