Skip to content

👷 Update CI workflow #2

👷 Update CI workflow

👷 Update CI workflow #2

Workflow file for this run

name: Run Tests
on:
push:
branches:
- main
pull_request:
env:
solana_version: v1.18.8
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: install rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Cache rust
uses: Swatinem/rust-cache@v2
- uses: actions/checkout@v4
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache node dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: install node_modules
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
yarn --frozen-lockfile
- uses: actions/cache@v4
name: cache solana cli
id: cache-solana
with:
path: |
~/.cache/solana/
~/.local/share/solana/
key: solana-${{ runner.os }}-v0000-${{ env.solana_version }}
- name: setup solana
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
solana --version
solana-keygen new --silent --no-bip39-passphrase
- name: run build
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
npm install -g @magicblock-labs/bolt-cli
bolt build
- name: run tests
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
npm install -g @magicblock-labs/bolt-cli
bolt test