From fe04297e9c3b02cf7badb1a0264525fe27ab4bd9 Mon Sep 17 00:00:00 2001 From: Lucas B Date: Wed, 7 Feb 2024 21:04:27 -0600 Subject: [PATCH] add test --- .github/workflows/build.yaml | 8 +++++++- test | 5 ----- tests/src/fixtures.rs | 12 ++---------- 3 files changed, 9 insertions(+), 16 deletions(-) delete mode 100755 test diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c8399676..38a19aca 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -62,16 +62,22 @@ jobs: shell: bash # Build IDLs - - name: Build validator-history + - name: Build validator_history IDL run: anchor build --idl idl --program-name validator_history # Make sure no uncommitted changes - name: Check for diff run: git diff --exit-code + - name: Build validator_history anchor to be used as SBF program in tests + run: anchor build + - name: cargo test run: RUST_LOG=debug cargo test --all-targets --all-features --color auto shell: bash + env: + RUST_LOG: debug + SBF_OUT_DIR: target/deploy verified-build: name: Build Verifiable Artifact diff --git a/test b/test deleted file mode 100755 index ff8c9304..00000000 --- a/test +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -cargo-build-sbf && \ - RUST_LOG=info \ - SBF_OUT_DIR=/Users/lucasbruder/jito/stakenet/target/sbf-solana-solana/release \ - cargo test diff --git a/tests/src/fixtures.rs b/tests/src/fixtures.rs index 1efff855..c23527fd 100644 --- a/tests/src/fixtures.rs +++ b/tests/src/fixtures.rs @@ -42,16 +42,8 @@ impl TestFixture { // prefer bpf on this to not run as a built-in program with actual runtime limitations // make sure the program is compiled and SBF_OUT_DIR is set correctly when running this! - let mut program = ProgramTest::new( - "validator_history", - validator_history::ID, - None - ); - program.add_program( - "jito_tip_distribution", - jito_tip_distribution::id(), - None - ); + let mut program = ProgramTest::new("validator_history", validator_history::ID, None); + program.add_program("jito_tip_distribution", jito_tip_distribution::id(), None); let epoch = 0; let vote_account = Pubkey::new_unique();