Skip to content

Merge pull request #2764 from pyth-network/cprussin/ui-123-fix-limits… #1104

Merge pull request #2764 from pyth-network/cprussin/ui-123-fix-limits…

Merge pull request #2764 from pyth-network/cprussin/ui-123-fix-limits… #1104

name: Test Solana Contract
on:
pull_request:
paths:
- .github/workflows/ci-solana-contract.yml
- target_chains/solana/**
- pythnet/pythnet_sdk/**
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: target_chains/solana
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
workspaces: "target_chains/solana -> target"
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.73.0
components: rustfmt, clippy
override: true
- name: Install Solana
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/v1.17.34/install)"
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- name: Format check
run: cargo fmt --all -- --check
if: success() || failure()
- name: Clippy check
run: cargo clippy --tests -- --deny warnings
if: success() || failure()
- name: Build
run: cargo-build-sbf
if: success() || failure()
- name: Run tests
run: cargo-test-sbf
if: success() || failure()
- name: Run sdk tests
run: cargo test --package pyth-solana-receiver-sdk
if: success() || failure()