Skip to content

Make rewards-delegated-vrf and anchor-rock-paper-scissor work with SDK 'backward-compat` flag #176

Make rewards-delegated-vrf and anchor-rock-paper-scissor work with SDK 'backward-compat` flag

Make rewards-delegated-vrf and anchor-rock-paper-scissor work with SDK 'backward-compat` flag #176

Workflow file for this run

name: Test Examples
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Enable Corepack
run: corepack enable
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: "1.85.0"
override: true
- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/v2.3.13/install)"
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Install Anchor
run: |
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install 0.32.1
avm use 0.32.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: Configure Validator Limits
run: |
sudo sysctl fs.inotify.max_user_instances=1280
sudo sysctl fs.inotify.max_user_watches=655360
- name: Test anchor-counter
env:
PROVIDER_ENDPOINT: http://127.0.0.1:8899
WS_ENDPOINT: ws://127.0.0.1:8900
EPHEMERAL_PROVIDER_ENDPOINT: http://127.0.0.1:7799
EPHEMERAL_WS_ENDPOINT: ws://127.0.0.1:7800
run: |
sudo prlimit --pid $$ --nofile=1048576:1048576
cd anchor-counter
yarn install
anchor test --provider.cluster localnet
# - 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
# anchor build
# yarn install
# anchor test \
# --skip-deploy
# - 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 magic-actions
# run: |
# cd magic-actions
# yarn install
# anchor build
# yarn install
# anchor test \
# --skip-deploy
# - name: Test oncurve-delegation
# run: |
# cd oncurve-delegation
# yarn install
# yarn test
# yarn test-web3js
# - 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
# - name: Test session-keys
# run: |
# cd session-keys
# yarn install
# anchor build
# yarn install
# anchor test \
# --skip-deploy