Repository navigation
Commit 3bf92cb
authored
fix: ci/cd tests (#76)
* fix: ci/cd tests
* fix: ci/cd tests
* fix: ci/cd tests
* fix: ci/cd tests
* fix: ci/cd tests
* fix: ci/cd tests
* fix: ci/cd tests
- Wrap ephemeral-validator in a pty (python3) so its mandatory ratatui/crossterm
TUI sees a controlling terminal; without one it silently exits 0 before
binding port 7799, both in CI and when invoked from a non-tty bg job.
- Move test endpoint env vars (PROVIDER_ENDPOINT, EPHEMERAL_PROVIDER_ENDPOINT,
TEE_PROVIDER_ENDPOINT, ROUTER_ENDPOINT, WS variants) to the workflow step so
the test runner doesn't fall back to devnet defaults. Tests read these
directly; setting them inside fullstack-test.sh leaked project conventions
into the script.
- Set anchor-counter Anchor.toml cluster to "localnet" so the merge of main
into this branch keeps localnet (was reverting to "devnet" via 3-way merge).
- Commit private-/public-counter program keypairs and update .gitignore so
deploy doesn't fail with DeclaredProgramIdMismatch on fresh clones; declare_id!()
values now match the committed keypairs (no anchor keys sync needed).
- fullstack-test.sh: wait for the upstream validator to be producing slots
(commitment=processed) before starting ephemeral-validator; portable sed -E
for slot extraction (BSD vs GNU); harden the kill of anchor's pre-flight
validator with SIGTERM->SIGKILL and a port-free poll; honor --provider.cluster
override from the anchor CLI; print mb-test-validator log on ephemeral failure
with ANSI codes stripped.
- Workflow: set kernel inotify limits ahead of time, raise nofile via prlimit
in the same step as anchor test (prlimit on $$ doesn't propagate across
GitHub Actions step shells).
* fix: ci/cd tests
- Tests construct wsEndpoint by replacing http:// → ws:// while keeping the
RPC port. Solana convention uses RPC on port N and WS on N+1, so
http://127.0.0.1:8899 was producing ws://127.0.0.1:8899 instead of
ws://127.0.0.1:8900, leading to TransactionExpiredTimeoutError when
sendAndConfirm couldn't subscribe for confirmation.
- Honor explicit WS_ENDPOINT / EPHEMERAL_WS_ENDPOINT / TEE_WS_ENDPOINT env
vars and fall back to undefined (web3.js auto-derive, which correctly
bumps the port).
- Workflow: pass the matching WS env vars so localnet runs subscribe to the
right port.
* fix: public counter1 parent 55e0453 commit 3bf92cb
12 files changed
Lines changed: 175 additions & 100 deletions
File tree
- .github/workflows
- anchor-counter
- programs
- private-counter/src
- public-counter/src
- target/deploy
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 54 | | |
66 | 55 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 56 | + | |
81 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
82 | 63 | | |
| 64 | + | |
83 | 65 | | |
84 | | - | |
85 | 66 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 67 | + | |
94 | 68 | | |
95 | 69 | | |
96 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments