🧪 [testing improvement] Add comprehensive tests and fix continuity for calculate_bpb_bonus
#23
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Verifiable Build & Test | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-unknown-linux-gnu | |
| - name: Install Solana Tool Suite | |
| uses: solana-program/actions/install-solana@v1 | |
| with: | |
| version: v1.18.18 | |
| - name: Check Environment | |
| run: | | |
| solana --version | |
| cargo --list | |
| - name: Install Anchor | |
| run: | | |
| cargo install --git https://github.com/coral-xyz/anchor --tag v0.31.1 anchor-cli --locked | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install Dependencies | |
| run: | | |
| npm install --legacy-peer-deps | |
| cd programs/helix-staking && npm install --legacy-peer-deps | |
| cd ../../app/web && npm install --legacy-peer-deps | |
| cd ../../services/indexer && npm install --legacy-peer-deps | |
| - name: Run Bankrun Tests (Program) | |
| run: | | |
| cd tests/bankrun | |
| npm install --legacy-peer-deps | |
| npm test | |
| - name: Run Verifiable Build | |
| # Uses Docker to build the program verifiably | |
| run: | | |
| anchor build --verifiable | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: program-build | |
| path: target/verifiable/ |