Skip to content

add claimable reward #38

add claimable reward

add claimable reward #38

name: CI
on:
push:
branches:
- main
- staging
- develop
pull_request:
branches:
- main
- staging
- develop
env:
SOLANA_CLI_VERSION: 1.16.22
NODE_VERSION: 18.14.2
ANCHOR_CLI_VERSION: 0.28.0
jobs:
changed_files:
runs-on: ubuntu-latest
outputs:
program: ${{steps.changed-files-specific.outputs.any_changed}}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/[email protected]
with:
files: |
cli
programs
tests
reward_pool_test:
runs-on: ubuntu-latest
needs: changed_files
if: needs.changed_files.outputs.program == 'true'
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup-solana
- uses: ./.github/actions/setup-dep
- uses: ./.github/actions/setup-anchor-cli
# Install rust + toolchain
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
# Cache rust, cargo
- uses: Swatinem/rust-cache@v1
# Cache node_modules
- uses: actions/cache@v2
id: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
# Check code formatting
- run: cargo fmt -- --check
shell: bash
# Clippy check
# - run: cargo clippy --package farming && cargo clippy --package locking && cargo clippy --package staking
# shell: bash
# Testing
- run: npm install
shell: bash
- run: cd programs && cargo test -- --nocapture && cargo test-bpf -- --nocapture && cd ../..
shell: bash
- run: anchor test -- --features devnet
shell: bash