Skip to content

Commit 26ba556

Browse files
author
tilo-14
committed
Fix typescript workflow to test each basic-operations project individually
Each basic-operations/anchor subdirectory (burn, create, update, close, reinit) is a standalone Anchor project, not a workspace. This updates the CI matrix to list each project individually and dynamically extract the program name for the test validator.
1 parent a80fea0 commit 26ba556

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/typescript-tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ jobs:
2727
matrix:
2828
example:
2929
- counter/anchor
30-
- basic-operations/anchor
30+
- basic-operations/anchor/burn
31+
- basic-operations/anchor/create
32+
- basic-operations/anchor/update
33+
- basic-operations/anchor/close
34+
- basic-operations/anchor/reinit
3135
steps:
3236
- uses: actions/checkout@v4
3337

@@ -55,8 +59,9 @@ jobs:
5559
- name: Start test validator
5660
working-directory: ${{ matrix.example }}
5761
run: |
58-
PROGRAM_ID=$(grep -A 1 "\[programs.localnet\]" Anchor.toml | grep "counter" | sed 's/.*"\(.*\)".*/\1/')
59-
light test-validator --sbf-program "$PROGRAM_ID" ./target/deploy/counter.so &
62+
PROGRAM_NAME=$(basename ${{ matrix.example }})
63+
PROGRAM_ID=$(grep -A 1 "\[programs.localnet\]" Anchor.toml | grep "$PROGRAM_NAME" | sed 's/.*"\(.*\)".*/\1/')
64+
light test-validator --sbf-program "$PROGRAM_ID" ./target/deploy/${PROGRAM_NAME}.so &
6065
sleep 10
6166
6267
- name: Run TypeScript tests

0 commit comments

Comments
 (0)