Skip to content
Open
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
53 changes: 53 additions & 0 deletions .github/workflows/solana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Solana CI

on:
push:
branches: [main, develop]
paths:
- 'solana/**'
pull_request:
paths:
- 'solana/**'

jobs:
test:
name: Mollusk Tests
runs-on: warp-ubuntu-2204-x64-16x
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libudev-dev

- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.86.0

- name: Cache Solana CLI and platform tools
uses: actions/cache@v3
id: solana-cache
with:
path: |
~/.local/share/solana
~/.cache/solana
key: ${{ runner.os }}-solana-stable

- name: Install Solana CLI
if: steps.solana-cache.outputs.cache-hit != 'true'
run: sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"

- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
cache-provider: warpbuild
shared-key: "solana-test"
workspaces: solana
cache-on-failure: true
cache-all-crates: true

- name: Run Mollusk tests
run: |
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
make solana-run-tests
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,7 @@ solana-deploy-dev solana-deploy:

rust-run-tests:
cargo nextest run --manifest-path $(NEAR_MANIFEST) --all-features

solana-run-tests:
cd $(MAKEFILE_DIR)/solana && cargo build-sbf
cd $(MAKEFILE_DIR)/solana && cargo test --package bridge_token_factory --test mollusk --features no-entrypoint
4 changes: 2 additions & 2 deletions solana/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

```sh
cd solana
anchor build # build the program
anchor test # run tests (requires local validator)
anchor build # build bridge_token_factory.so + stub_program.so
cargo test --package bridge_token_factory --test mollusk # fast unit tests, no validator
```

## Key Architecture
Expand Down
Loading
Loading