Skip to content

Commit

Permalink
fix: update anchor gh ci
Browse files Browse the repository at this point in the history
  • Loading branch information
wiseaidev committed Jul 10, 2024
1 parent 6cd916a commit 437e3bb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/program.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,26 @@ jobs:
- name: Install Solana CLI
run: |
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
export PATH="~/.local/share/solana/install/active_release/bin:$PATH"
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
- name: Install Solana Build Tools
run: |
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v1.17.17/install/solana-install-init.sh | sh -s - v1.17.17
curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v1.17.17/install/solana-install-init.sh | sh -s - v1.18.15
- name: Install Anchor CLI
run: |
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y pkg-config build-essential libudev-dev libssl-dev
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install latest
avm use latest
anchor --version
- name: Generate Keypair
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
solana config set --url localhost
solana config get
solana-keygen new
export ANCHOR_WALLET="~/.config/solana/id.json"
solana config set -k ~/.config/solana/id.json
- name: Run Integration Tests
run: cd examples/todo-program && anchor test
run: |
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
cd examples/todo-program && anchor test
6 changes: 0 additions & 6 deletions examples/todo-program/tests/src/test_ix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ fn test_initialize_account() {
println!("InitializeAccount transaction signature: {}", tx);
}

#[test]
fn test_create_todo() {
let (_client, program, program_id, authority) = setup_program();

Expand Down Expand Up @@ -91,7 +90,6 @@ fn test_create_todo() {
println!("CreateTodo transaction signature: {}", tx);
}

#[test]
fn test_update_todo() {
test_create_todo();

Expand Down Expand Up @@ -131,11 +129,7 @@ fn test_update_todo() {
println!("UpdateTodo transaction signature: {}", tx);
}

#[test]
fn test_delete_todo() {
test_initialize_account();
test_create_todo();

let (_client, program, program_id, authority) = setup_program();

let todo_account_pubkey =
Expand Down

0 comments on commit 437e3bb

Please sign in to comment.