Skip to content

v0.1.1

v0.1.1 #3

Workflow file for this run

name: Mock Oracles Program
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
lint-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
components: rustfmt, clippy
- name: Cache dependencies
uses: Swatinem/rust-cache@v1
- name: Formatting and Linting
run: |
cargo fmt -- --check
cargo clippy
lint-ts-and-run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: yarn install
- run: yarn add -g @coral-xyz/anchor mocha
# Install Solana
- name: Cache Solana binaries
id: solana-cache
uses: actions/cache@v2
with:
path: |
~/.cache/solana
~/.local/share/solana/install
key: ${{ runner.os }}-${{ env.SOLANA_VERSION }}
- name: Install Solana
if: steps.solana-cache.outputs.cache-hit != 'true'
run: |
sh -c "$(curl -sSfL https://release.solana.com/v1.17.16/install)"
- name: Setup Solana Path
run: |
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
solana --version
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
components: rustfmt, clippy
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v1
- name: Generate keypair
run: solana-keygen new --no-bip39-passphrase
- name: Install Anchor
run: |
sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev
npm i -g @coral-xyz/anchor-cli
- name: Build Self
run: anchor build
- name: Lint TS
run: yarn lint:ci
- name: Generate IDL
run: yarn idl:generate
- name: Build SDK
run:
yarn build
- name: Run E2E Tests
run: yarn test:e2e