Skip to content

Fix/ci

Fix/ci #78

Workflow file for this run

name: PR validation
on:
pull_request:
env:
ANCHOR_VER: 0.30.1
SOLANA_CLI_VER: 2.1.13
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install Yarn # required for integration tests
run: npm install -g yarn
- name: Cache Solana CLI tools # cache solana cli-tools
uses: actions/cache@v4
with:
path: |
~/.cache/solana/
~/.local/share/solana/
key: solana-cli-${{ runner.os }}-build-${{ env.SOLANA_CLI_VER }}
- name: Install Solana CLI (beta) # required for integration tests
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/v${{ env.SOLANA_CLI_VER }}/install)"
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: "./contracts/fusion-contract"
- name: Cache Rustup
uses: actions/cache@v4
with:
path: |
~/.rustup
key: rustup-${{ runner.os }}
- name: Install Anchor
run: npm i -g @coral-xyz/anchor-cli@${{ env.ANCHOR_VER }}
shell: bash
- name: Install Dependencies
run: pnpm install
- name: Linter
run: pnpm lint
- name: Types
run: pnpm lint:types
- name: Unit tests
run: pnpm test
- name: Integration tests
run: pnpm test:integration