Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/light-system-programs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
paths:
- "programs/**"
- "program-tests/**"
- "program-libs/verifier/**"
- "program-libs/**"
- "merkle-tree/**"
- ".github/workflows/light-system-programs-tests.yml"
- "test-utils/**"
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- program: light-compressed-token
sub-tests: '["cargo-test-sbf -p compressed-token-test"]'
- program: system-cpi-test
sub-tests: '["cargo-test-sbf -p system-cpi-test"]'
sub-tests: '["cargo-test-sbf -p system-cpi-test", "cargo test -p light-system-program-pinocchio --all-features"]'
- program: system-cpi-test-v2-event
sub-tests: '["cargo-test-sbf -p system-cpi-v2-test -- event::parse"]'
- program: system-cpi-test-v2-functional
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
push:
branches: [main]
paths:
- "**/*.rs"
- "program-libs/**"
- "**/Cargo.*"
- ".cargo/**"
- "prover/client/**"
- ".github/workflows/rust.yml"
pull_request:
branches: ["*"]
paths:
- "**/*.rs"
- "program-libs/**"
- "**/Cargo.*"
- "prover/client/**"
- ".github/workflows/rust.yml"
Expand Down Expand Up @@ -50,6 +50,7 @@ jobs:
cargo test -p aligned-sized
cargo test -p light-hasher --all-features
cargo test -p light-compressed-account --all-features
cargo test -p light-compressed-account --features new-unique
cargo test -p light-account-checks --all-features
cargo test -p light-verifier --all-features
cargo test -p light-merkle-tree-metadata --all-features
Expand All @@ -64,16 +65,6 @@ jobs:
cargo test -p light-bloom-filter --all-features
cargo test -p light-indexed-merkle-tree --all-features
cargo test -p light-batched-merkle-tree --all-features -- --test test_e2e
- name: sdk-libs
packages: light-macros light-sdk light-program-test light-client light-batched-merkle-tree
test_cmd: |
cargo test -p light-macros
cargo test -p light-sdk
cargo test -p light-program-test
cargo test -p light-client
cargo test-sbf -p client-test
cargo test -p light-sparse-merkle-tree
cargo test -p light-batched-merkle-tree --features test-only -- --skip test_simulate_transactions --skip test_e2e

name: Test ${{ matrix.group.name }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ on:
branches:
- main
paths:
- "examples/**"
- "program-libs/**"
- "programs/**"
- "sdk-tests/**"
- "sdk-libs/**"
pull_request:
branches:
- "*"
paths:
- "examples/**"
- "programs/**"
- "program-libs/**"
- "sdk-tests/**"
- "sdk-libs/**"
types:
- opened
Expand Down Expand Up @@ -48,10 +52,19 @@ jobs:
matrix:
include:
- program: sdk-test-program
sub-tests: '["cargo-test-sbf -p sdk-test"]'
sub-tests: '["cargo-test-sbf -p sdk-native-test"]'
- program: sdk-anchor-test-program
sub-tests: '["cargo-test-sbf -p sdk-anchor-test", "cargo-test-sbf -p sdk-pinocchio-test"]'

- program: sdk-libs
packages: light-macros light-sdk light-program-test light-client light-batched-merkle-tree
test_cmd: |
cargo test -p light-macros
cargo test -p light-sdk
cargo test -p light-program-test
cargo test -p light-client
cargo test -p client-test
cargo test -p light-sparse-merkle-tree
cargo test -p light-batched-merkle-tree --features test-only -- --skip test_simulate_transactions --skip test_e2e
Comment on lines +58 to +67
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Matrix entry won’t run tests; sub-tests missing and test_cmd unused in step.

The step only iterates matrix['sub-tests']; for the sdk-libs entry you provided packages/test_cmd, so the job will either fail (null JSON) or skip the intended tests.

Replace the sdk-libs matrix entry to use sub-tests like the others:

-          - program: sdk-libs
-            packages: light-macros light-sdk light-program-test light-client light-batched-merkle-tree
-            test_cmd: |
-              cargo test -p light-macros
-              cargo test -p light-sdk
-              cargo test -p light-program-test
-              cargo test -p light-client
-              cargo test -p client-test
-              cargo test -p light-sparse-merkle-tree
-              cargo test -p light-batched-merkle-tree --features test-only -- --skip test_simulate_transactions --skip test_e2e
+          - program: sdk-libs
+            sub-tests: '[
+              "cargo test -p light-macros",
+              "cargo test -p light-sdk",
+              "cargo test -p light-program-test",
+              "cargo test -p light-client",
+              "cargo test -p client-test",
+              "cargo test -p light-sparse-merkle-tree",
+              "cargo test -p light-batched-merkle-tree --features test-only -- --skip test_simulate_transactions --skip test_e2e"
+            ]'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- program: sdk-libs
packages: light-macros light-sdk light-program-test light-client light-batched-merkle-tree
test_cmd: |
cargo test -p light-macros
cargo test -p light-sdk
cargo test -p light-program-test
cargo test -p light-client
cargo test -p client-test
cargo test -p light-sparse-merkle-tree
cargo test -p light-batched-merkle-tree --features test-only -- --skip test_simulate_transactions --skip test_e2e
- program: sdk-libs
sub-tests: '[
"cargo test -p light-macros",
"cargo test -p light-sdk",
"cargo test -p light-program-test",
"cargo test -p light-client",
"cargo test -p client-test",
"cargo test -p light-sparse-merkle-tree",
"cargo test -p light-batched-merkle-tree --features test-only -- --skip test_simulate_transactions --skip test_e2e"
]'
🤖 Prompt for AI Agents
.github/workflows/sdk-tests.yml around lines 58 to 67: the sdk-libs matrix entry
uses `packages` and `test_cmd` which aren’t consumed by the runner (it reads
matrix['sub-tests']), so tests will be skipped or fail; replace that entry to
match the other matrix entries by removing `packages`/`test_cmd` and providing a
`sub-tests` array containing each individual test command (e.g., cargo test -p
light-macros, cargo test -p light-sdk, cargo test -p light-program-test, cargo
test -p light-client, cargo test -p client-test, cargo test -p
light-sparse-merkle-tree, cargo test -p light-batched-merkle-tree --features
test-only -- --skip test_simulate_transactions --skip test_e2e) so the job
iterates these via matrix.sub-tests.

steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -66,14 +79,22 @@ jobs:
source ./scripts/devenv.sh
npx nx build @lightprotocol/programs

- name: ${{ matrix.program }}
- name: Run sub-tests for ${{ matrix.program }}
if: matrix.sub-tests != null
run: |
source ./scripts/devenv.sh
npx nx build @lightprotocol/zk-compression-cli

IFS=',' read -r -a sub_tests <<< "${{ join(fromJSON(matrix['sub-tests']), ', ') }}"
IFS=',' read -r -a sub_tests <<< "${{ join(fromJSON(matrix.sub-tests), ', ') }}"
for subtest in "${sub_tests[@]}"
do
echo "$subtest"
eval "RUSTFLAGS=\"-D warnings\" $subtest"
done

- name: Run tests for ${{ matrix.program }}
if: matrix.test_cmd != null
run: |
source ./scripts/devenv.sh
npx nx build @lightprotocol/zk-compression-cli
${{ matrix.test_cmd }}
Loading
Loading