From 3310fd59c538f1cdd13ee7a0883ae52df785ddd5 Mon Sep 17 00:00:00 2001 From: Ebina Perelyn Okoh Date: Sun, 26 Oct 2025 04:03:32 +0100 Subject: [PATCH 1/2] remove test to rust action --- .github/workflows/rust.yml | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 62a219d39..6cbd2e990 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,34 +10,13 @@ on: branches: - main pull_request: - types: [ opened, synchronize, reopened ] + types: [opened, synchronize, reopened] branches: - main # A workflow run is made up of one or more jobs, which run in parallel by default # Each job runs in a runner environment specified by runs-on jobs: - # Unique identifier of our job (`job_id`) - test: - # Sets the name `Test` for the job, which is displayed in the GitHub UI - name: Test - # Containers must run in Linux based operating systems - runs-on: ubuntu-latest - steps: - # Downloads a copy of the code in your repository before running CI tests - - name: Check out repository code - # The uses keyword specifies that this step will run v3 of the actions/checkout action. - # This is an action that checks out your repository onto the runner, allowing you to run scripts or other actions against your code (such as build and test tools). - # You should use the checkout action any time your workflow will run against the repository's code. - uses: actions/checkout@v4 - - # This GitHub Action installs a Rust toolchain using rustup. It is designed for one-line concise usage and good defaults. - - name: Install the Rust toolchain - uses: dtolnay/rust-toolchain@stable - - - name: Run tests - run: cargo test - # `fmt` container job fmt: name: Rustfmt From f5315263e4e2b1eac5bded47e78902e2f3c4f3f4 Mon Sep 17 00:00:00 2001 From: Ebina Perelyn Okoh Date: Sun, 26 Oct 2025 04:04:08 +0100 Subject: [PATCH 2/2] add cargo test to solana-native action --- .github/workflows/solana-native.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/solana-native.yml b/.github/workflows/solana-native.yml index df3c66e49..97e89aedb 100644 --- a/.github/workflows/solana-native.yml +++ b/.github/workflows/solana-native.yml @@ -135,6 +135,17 @@ jobs: return 1 fi + # Run Rust unit tests + if [ -d "program" ]; then + echo "Running Rust unit tests for $project" + if ! cargo test --manifest-path=./program/Cargo.toml; then + echo "::error::Rust unit tests failed for $project" + echo "$project: Rust unit tests failed with $solana_version" >> $GITHUB_WORKSPACE/failed_projects.txt + cd - > /dev/null + return 1 + fi + fi + # Test if ! pnpm build-and-test; then echo "::error::tests failed for $project"