Skip to content

doc(manual flow): optimize manual flow. CLUSTER and PROJECT_ID introd… #458

doc(manual flow): optimize manual flow. CLUSTER and PROJECT_ID introd…

doc(manual flow): optimize manual flow. CLUSTER and PROJECT_ID introd… #458

Workflow file for this run

name: tests
on:
pull_request:
branches: ["develop", "main"]
paths:
- "engine/**"
- ".github/workflows/**"
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: "24.10.0"
SOLANA_VERSION: "2.1.0"
ANCHOR_VERSION: "0.31.1"
defaults:
run:
working-directory: engine
jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: dtolnay/rust-toolchain@1.84.0
with:
toolchain: 1.84.0
components: clippy
- name: Restore Solana CLI cache
id: solana-restore
uses: actions/cache/restore@v4
with:
path: /home/runner/.local/share/solana/install
key: solana-${{ runner.os }}-${{ env.SOLANA_VERSION }}
- name: Install Solana (if cache miss)
if: steps.solana-restore.outputs.cache-hit != 'true'
shell: bash
run: |
set -euxo pipefail
curl --proto '=https' --tlsv1.2 -sSfL https://solana-install.solana.workers.dev | bash -s - v${SOLANA_VERSION}
- name: Add Solana to PATH
shell: bash
run: echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH"
- name: Verify Solana
shell: bash
run: solana --version
- name: Save Solana CLI cache
if: steps.solana-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: /home/runner/.local/share/solana/install
key: solana-${{ runner.os }}-${{ env.SOLANA_VERSION }}
- name: Add Cargo bin to PATH
shell: bash
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Restore AVM/Anchor cache
id: avm-restore
uses: actions/cache/restore@v4
with:
path: |
/home/runner/.cargo/bin/avm
/home/runner/.avm
key: anchor-${{ runner.os }}-${{ env.ANCHOR_VERSION }}
- name: Install AVM + Anchor (if cache miss)
if: steps.avm-restore.outputs.cache-hit != 'true'
shell: bash
run: |
set -euxo pipefail
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install ${ANCHOR_VERSION}
avm use ${ANCHOR_VERSION}
anchor --version
- name: Verify Anchor
shell: bash
run: |
avm use ${ANCHOR_VERSION}
anchor --version
- name: Save AVM/Anchor cache
if: steps.avm-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
/home/runner/.cargo/bin/avm
/home/runner/.avm
key: anchor-${{ runner.os }}-${{ env.ANCHOR_VERSION }}
- name: Enable Yarn
run: |
corepack enable
corepack prepare yarn@1.22.22 --activate
- name: Restore engine program cache
id: engine-restore
uses: actions/cache/restore@v4
with:
path: |
engine/target
/home/runner/.cargo/registry
/home/runner/.cargo/git
key: anchor-${{ runner.os }}-${{ env.ANCHOR_VERSION }}-${{ github.head_ref || github.ref_name }}
- name: Cargo clippy
run: cargo clippy -- -D warnings
- name: Cargo test
run: cargo test --package engine --package income-dispatcher
- name: yarn build
run: yarn build
- name: Save engine program cache
uses: actions/cache/save@v4
with:
path: |
engine/target
/home/runner/.cargo/registry
/home/runner/.cargo/git
key: anchor-${{ runner.os }}-${{ env.ANCHOR_VERSION }}-${{ github.head_ref || github.ref_name }}
- name: Install deps
run: yarn install --frozen-lockfile
- name: Restore Raydium programs cache
id: raydium-restore
uses: actions/cache/restore@v4
with:
path: engine/tests/resources
key: raydium-programs-${{ runner.os }}-v1
- name: Dump Raydium programs (if cache miss)
if: steps.raydium-restore.outputs.cache-hit != 'true'
run: yarn dump:raydium
- name: Save Raydium programs cache
if: steps.raydium-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: engine/tests/resources
key: raydium-programs-${{ runner.os }}-v1
- name: Run litesvm tests
run: anchor run litesvm