Skip to content

Commit f531526

Browse files
committed
add cargo test to solana-native action
1 parent 3310fd5 commit f531526

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/solana-native.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,17 @@ jobs:
135135
return 1
136136
fi
137137
138+
# Run Rust unit tests
139+
if [ -d "program" ]; then
140+
echo "Running Rust unit tests for $project"
141+
if ! cargo test --manifest-path=./program/Cargo.toml; then
142+
echo "::error::Rust unit tests failed for $project"
143+
echo "$project: Rust unit tests failed with $solana_version" >> $GITHUB_WORKSPACE/failed_projects.txt
144+
cd - > /dev/null
145+
return 1
146+
fi
147+
fi
148+
138149
# Test
139150
if ! pnpm build-and-test; then
140151
echo "::error::tests failed for $project"

0 commit comments

Comments
 (0)