Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-anchor/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Setup node js and anchor cli"
runs:
using: "composite"
steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- run: cargo install --git https://github.com/coral-xyz/anchor --tag v${{ env.ANCHOR_CLI_VERSION }} anchor-cli --locked
Expand Down
36 changes: 28 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
pull_request:
branches:
- main
- release_0.2.1
- release_*

env:
SOLANA_CLI_VERSION: 2.1.0
NODE_VERSION: 22.15.0
ANCHOR_CLI_VERSION: 0.31.0
TOOLCHAIN: 1.76.0
ANCHOR_CLI_VERSION: 0.31.1
TOOLCHAIN: 1.85.0

jobs:
program_changed_files:
Expand All @@ -27,6 +27,8 @@ jobs:
with:
files: |
programs/zap
protocol-zap
zap-sdk

anchor_build:
runs-on: ubuntu-latest
Expand All @@ -51,26 +53,44 @@ jobs:
- run: anchor build
shell: bash

program_test:
unit_test:
runs-on: ubuntu-latest
needs: program_changed_files
if: needs.program_changed_files.outputs.program == 'true'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOLCHAIN }}
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo test --package zap
shell: bash
- run: cargo test --package protocol-zap
shell: bash

integration_test:
runs-on: ubuntu-latest
needs: program_changed_files
if: needs.program_changed_files.outputs.program == 'true'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/setup-solana
- uses: ./.github/actions/setup-dep
- uses: ./.github/actions/setup-anchor
# Install pnpm
- uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 9.5.0 # Optional: specify a pnpm version
- uses: pnpm/action-setup@v4 # docs https://pnpm.io/continuous-integration#github-actions
# Install rust + toolchain
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOLCHAIN }}
components: clippy
# Cache rust, cargo
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
# Cache node_modules
- uses: actions/cache@v4
id: cache-node-modules
Expand Down
6 changes: 4 additions & 2 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[toolchain]
package_manager = "yarn"
anchor_version = "0.31.1"
solana_version = "2.1.0"
package_manager = "pnpm"

[features]
resolution = true
Expand All @@ -16,4 +18,4 @@ cluster = "localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
test = "pnpm ts-mocha --no-experimental-strip-types -p ./tsconfig.json -t 1000000 tests/**/*.ts"
60 changes: 53 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[workspace]
members = [
"programs/*"
]
members = ["programs/*", "libs/*", "zap-sdk", "protocol-zap"]
resolver = "2"

[profile.release]
Expand All @@ -16,4 +14,5 @@ codegen-units = 1
[workspace.dependencies]
anchor-lang = "0.31.1"
anchor-spl = "0.31.1"
bytemuck = "1.20.0"
bytemuck = "1.20.0"
ruint = "1.3.0"
Loading
Loading