Minor refactoring #38
This file contains 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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Build Next.js app | |
run: pnpm run build:app | |
- name: Setup Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- name: Rust Version 1.75.0 | |
run: rustup default 1.75.0 | |
- name: Install Solana CLI | |
run: | | |
SOLANA_VERSION=v1.18.22 | |
curl -sSfL https://release.solana.com/$SOLANA_VERSION/install | sh | |
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | |
- name: Install AVM | |
run: cargo install --git https://github.com/coral-xyz/anchor avm --locked --force | |
- name: Install Anchor CLI 0.29.0 | |
run: avm install 0.29.0 | |
- name: Use Anchor CLI 0.29.0 | |
run: avm use 0.29.0 | |
- name: Build the program | |
run: pnpm build:protocol | |
- name: Run tests | |
run: pnpm -F=protocol test | |