-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(actions)!: add full sync test (#3582)
* add(tests): full sync test * fix(test): add build * fix(deploy): escape double dashes '--' correctly * fix(test): remove unexpected --no-capture arg error: Found argument '--nocapture' which wasn't expected, or isn't valid in this context * refactor(docker): use default executable as entrypoint * refactor(startup): add a custom entrypoint * fix(test): add missing TEST_FULL_SYNC variable * test(timeout): use the biggest machine * fix * fix(deploy): use latest successful image * typo * refactor(docker): generate config file at startup * revert(build): changes were made to docker * fix(docker): send variables correctly to the entrypoint * test different conf file approach * fix(env): add RUN_TEST env variable * ref: use previous approach * fix(color): use environment variable * fix(resources): use our normal machine size * fix(ci): double CPU and RAM for full sync test * fix(test): check for zebrad test output in the correct order The mempool is only activated once, so we must check for that log first. After mempool activation, the stop regex is logged at least once. (It might be logged before as well, but we can't rely on that.) When checking that the mempool didn't activate, wait for the `zebrad` command to exit, then check the entire log. * fix(ci): run full sync test with full compiler optimisations * fix(tests): reintroduce tests and run full sync on approval * fix(tests): reduce the changelog Co-authored-by: teor <teor@riseup.net>
- Loading branch information
1 parent
a0c4512
commit db966f2
Showing
3 changed files
with
158 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
if [ ! -f /app/zebrad.toml ]; then | ||
echo " | ||
[consensus] | ||
checkpoint_sync = ${CHECKPOINT_SYNC} | ||
[metrics] | ||
endpoint_addr = 0.0.0.0:9999 | ||
[network] | ||
network = ${NETWORK} | ||
[state] | ||
cache_dir = /zebrad-cache | ||
[tracing] | ||
force_use_color = true | ||
endpoint_addr = 0.0.0.0:3000" > /app/zebrad.toml | ||
fi | ||
|
||
case "$1" in | ||
-- | cargo) | ||
if [[ "$RUN_TESTS" -eq "1" ]]; then | ||
if [[ "$TEST_FULL_SYNC" -eq "1" ]]; then | ||
exec cargo "test" "--locked" "--release" "--features" "enable-sentry" "--test" "acceptance" "--" "--nocapture" "--ignored" "full_sync_mainnet" | ||
else | ||
exec cargo "test" "--locked" "--release" "--features" "enable-sentry" "--workspace" "--" "--include-ignored" | ||
fi | ||
fi | ||
;; | ||
zebrad) | ||
exec zebrad "$@" | ||
;; | ||
*) | ||
exec "$@" | ||
esac | ||
|
||
exit 1 |