Skip to content

Feat/add move lock fix #110

Feat/add move lock fix

Feat/add move lock fix #110

name: Govern
on:
pull_request:
branches:
- main
env:
SOLANA_CLI_VERSION: 1.16.12
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: |
programs/govern
govern_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: dtolnay/[email protected]
# 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') }}
# Build CLI
- run: cargo build --package govern-cli --locked
shell: bash
# Testing
- run: cargo test --package govern -- --nocapture
shell: bash
- run: npm install
shell: bash
- run: anchor test --run ./tests/govern -- --features test-bpf
shell: bash