-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docker): add
docker-compose
file to run CI locally (#8209)
* ref(docker): Consolidate all tests in the `entrypoint.sh` script * fix(ci): missing docker argument * fix(ci): do not blank `ENTRYPOINT_FEATURES` vairable * fix(docker): do not add `shielded-scan` as part of `TEST_FEATURES` * chore: remove misleading comment * feat(docker): add `docker-compose` file to run CI locally * fix(docs): do not remove previous sections until we have a substitute for users * fix(docs): revert some changes * fix: typos * ref(docker): Consolidate all tests in the `entrypoint.sh` script * fix(ci): missing docker argument * fix(ci): do not blank `ENTRYPOINT_FEATURES` vairable * fix(docker): do not add `shielded-scan` as part of `TEST_FEATURES` * chore: remove misleading comment * Update docker/Dockerfile Co-authored-by: Arya <[email protected]> --------- Co-authored-by: Arya <[email protected]>
- Loading branch information
1 parent
184c30e
commit 18477ec
Showing
3 changed files
with
145 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: "3.8" | ||
|
||
services: | ||
zebra: | ||
build: | ||
context: ../ | ||
dockerfile: docker/Dockerfile | ||
target: tests | ||
restart: unless-stopped | ||
deploy: | ||
resources: | ||
reservations: | ||
cpus: "4" | ||
memory: 16G | ||
# Change this to the command you want to run, respecting the entrypoint.sh | ||
# For example, to run the tests, use the following command: | ||
# command: ["cargo", "test", "--locked", "--release", "--features", "${TEST_FEATURES}", "--package", "zebrad", "--test", "acceptance", "--", "--nocapture", "--include-ignored", "sync_large_checkpoints_"] | ||
volumes: | ||
- zebrad-cache:/var/cache/zebrad-cache | ||
- lwd-cache:/var/cache/lwd-cache | ||
ports: | ||
# Zebra uses the following inbound and outbound TCP ports | ||
- "8232:8232" # Opens an RPC endpoint (for wallet storing and mining) | ||
- "8233:8233" # Mainnet Network (for peer connections) | ||
- "18233:18233" # Testnet Network | ||
# - "9999:9999" # Metrics | ||
# - "3000:3000" # Tracing | ||
env_file: | ||
- test.env | ||
|
||
volumes: | ||
zebrad-cache: | ||
driver: local | ||
|
||
lwd-cache: | ||
driver: local |
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,70 @@ | ||
RUST_LOG=info | ||
# This variable forces the use of color in the logs | ||
ZEBRA_FORCE_USE_COLOR=1 | ||
LOG_COLOR=true | ||
|
||
### | ||
# Configuration Variables | ||
# These variables are used to configure the zebra node | ||
# Check the entrypoint.sh script for more details | ||
### | ||
|
||
# Path and name of the config file. These two have defaults set in the Dockerfile. | ||
ZEBRA_CONF_PATH=/etc/zebrad/zebrad.toml | ||
# [network] | ||
NETWORK=Mainnet | ||
ZEBRA_LISTEN_ADDR=0.0.0.0 | ||
# [consensus] | ||
ZEBRA_CHECKPOINT_SYNC=true | ||
# [state] | ||
# Set this to change the default cached state directory | ||
ZEBRA_CACHED_STATE_DIR=/var/cache/zebrad-cache | ||
LIGHTWALLETD_DATA_DIR=/var/cache/lwd-cache | ||
# [metrics] | ||
METRICS_ENDPOINT_ADDR=0.0.0.0 | ||
METRICS_ENDPOINT_PORT=9999 | ||
# [tracing] | ||
LOG_COLOR=false | ||
TRACING_ENDPOINT_ADDR=0.0.0.0 | ||
TRACING_ENDPOINT_PORT=3000 | ||
# [rpc] | ||
RPC_LISTEN_ADDR=0.0.0.0 | ||
# if ${RPC_PORT} is not set, it will use the default value for the current network | ||
# RPC_PORT= | ||
|
||
#### | ||
# Test Variables | ||
# These variables are used to run tests in the Dockerfile | ||
# Check the entrypoint.sh script for more details | ||
#### | ||
|
||
# Unit tests | ||
# TODO: These variables are evaluated to any value, even setting a NULL value will evaluate to true | ||
# TEST_FAKE_ACTIVATION_HEIGHTS= | ||
# ZEBRA_SKIP_NETWORK_TESTS | ||
# ZEBRA_SKIP_IPV6_TESTS | ||
RUN_ALL_TESTS= | ||
RUN_ALL_EXPERIMENTAL_TESTS= | ||
TEST_ZEBRA_EMPTY_SYNC= | ||
ZEBRA_TEST_LIGHTWALLETD= | ||
# Integration Tests | ||
# Most of these tests require a cached state directory to save the network state | ||
TEST_DISK_REBUILD= | ||
# These tests needs a Zebra cached state | ||
TEST_CHECKPOINT_SYNC= | ||
GENERATE_CHECKPOINTS_MAINNET= | ||
GENERATE_CHECKPOINTS_TESTNET= | ||
TEST_UPDATE_SYNC= | ||
# These tests need a Lightwalletd binary + a Zebra cached state | ||
TEST_LWD_RPC_CALL= | ||
TEST_GET_BLOCK_TEMPLATE= | ||
TEST_SUBMIT_BLOCK= | ||
# These tests need a Lightwalletd binary + Lightwalletd cached state + a Zebra cached state | ||
TEST_LWD_UPDATE_SYNC= | ||
TEST_LWD_GRPC= | ||
TEST_LWD_TRANSACTIONS= | ||
# Full sync tests | ||
# These tests could take a long time to run, depending on the network | ||
FULL_SYNC_MAINNET_TIMEOUT_MINUTES= | ||
FULL_SYNC_TESTNET_TIMEOUT_MINUTES= | ||
TEST_LWD_FULL_SYNC= |