Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/no-caching-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: false
solana_cli_version: 2.3.0
solana_cli_version: 2.3.13
node_version: 20.18.0
cargo_profile: release
anchor_binary_name: anchor-binary-no-caching
2 changes: 1 addition & 1 deletion .github/workflows/reusable-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ jobs:
path: tests/bpf-upgradeable-state/target
key: cargo-${{ runner.os }}-tests/bpf-upgradeable-state-${{ env.ANCHOR_VERSION }}-${{ env.SOLANA_CLI_VERSION }}-${{ hashFiles('**/Cargo.lock') }}

- run: solana-test-validator -r --quiet &
- run: ./launch-test-validator.sh
name: start validator
- run: cd tests/bpf-upgradeable-state && yarn --frozen-lockfile
- run: cd tests/bpf-upgradeable-state
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: true
solana_cli_version: 2.3.0
solana_cli_version: 2.3.13
node_version: 20.18.0
cargo_profile: debug
anchor_binary_name: anchor-binary
2 changes: 1 addition & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Anchor version.
ANCHOR_CLI=v0.32.1
# Solana toolchain.
SOLANA_CLI=v2.3.0
SOLANA_CLI=v2.3.13
# Build version should match the Anchor cli version.
VERSIONED_IMG_NAME=solanafoundation/anchor:$(ANCHOR_CLI)

Expand Down
20 changes: 20 additions & 0 deletions launch-test-validator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

# Launches the test validator in the background, waiting for it to be ready
# If the validator is not ready and healthy after 5 retries, exit with failure

# set -o pipefail

solana-test-validator -r --quiet 2>&1 >/dev/null &
curl http://localhost:8899 \
--json '{"jsonrpc":"2.0","id":1, "method":"getHealth"}' \
--retry-connrefused \
--retry 5 \
-s | grep '"ok"' >/dev/null

if [ $? -eq 0 ]; then
exit 0
else
echo "Validator didn't launch" >&2
exit 1
fi
4 changes: 2 additions & 2 deletions setup-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

active_version=$(solana -V | awk '{print $2}')
if [ "$active_version" != "2.3.0" ]; then
agave-install init 2.3.0
if [ "$active_version" != "2.3.13" ]; then
agave-install init 2.3.13
fi

git submodule update --init --recursive --depth 1
Expand Down
Loading