mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 12:21:18 +00:00
Show server output if federation tests fail in CI (#4389)
* Show server output if federation tests fail in CI * dummy failure * Revert dummy failure * Update private_message.rs * Fix errors * Update private_message.rs * Update private_message.rs * Update .woodpecker.yml * correct exit code * Update .woodpecker.yml * Update .woodpecker.yml * Update .woodpecker.yml * Update prepare-drone-federation-test.sh * Update .woodpecker.yml * Update prepare-drone-federation-test.sh * Update .woodpecker.yml * Update prepare-drone-federation-test.sh * Update private_message.rs * Update lib.rs * Update lib.rs * Update session_middleware.rs * Update session_middleware.rs * Update .woodpecker.yml
This commit is contained in:
parent
ade1cb1495
commit
f481a607d0
2 changed files with 23 additions and 6 deletions
|
@ -189,6 +189,15 @@ steps:
|
||||||
- yarn api-test
|
- yarn api-test
|
||||||
when: *slow_check_paths
|
when: *slow_check_paths
|
||||||
|
|
||||||
|
federation_tests_server_output:
|
||||||
|
image: alpine:3
|
||||||
|
commands:
|
||||||
|
# `|| true` prevents this step from appearing to fail if the server output files don't exist
|
||||||
|
- cat target/log/lemmy_*.out || true
|
||||||
|
- "# If you can't see all output, then use the download button"
|
||||||
|
when:
|
||||||
|
status: [failure]
|
||||||
|
|
||||||
publish_release_docker:
|
publish_release_docker:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
secrets: [docker_username, docker_password]
|
secrets: [docker_username, docker_password]
|
||||||
|
|
|
@ -3,8 +3,13 @@
|
||||||
# it is expected that this script is called by run-federation-test.sh script.
|
# it is expected that this script is called by run-federation-test.sh script.
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -n "$LEMMY_LOG_LEVEL" ];
|
||||||
|
then
|
||||||
|
LEMMY_LOG_LEVEL=warn
|
||||||
|
fi
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
export RUST_LOG="warn,lemmy_server=debug,lemmy_federate=debug,lemmy_api=debug,lemmy_api_common=debug,lemmy_api_crud=debug,lemmy_apub=debug,lemmy_db_schema=debug,lemmy_db_views=debug,lemmy_db_views_actor=debug,lemmy_db_views_moderator=debug,lemmy_routes=debug,lemmy_utils=debug,lemmy_websocket=debug"
|
export RUST_LOG="warn,lemmy_server=$LEMMY_LOG_LEVEL,lemmy_federate=$LEMMY_LOG_LEVEL,lemmy_api=$LEMMY_LOG_LEVEL,lemmy_api_common=$LEMMY_LOG_LEVEL,lemmy_api_crud=$LEMMY_LOG_LEVEL,lemmy_apub=$LEMMY_LOG_LEVEL,lemmy_db_schema=$LEMMY_LOG_LEVEL,lemmy_db_views=$LEMMY_LOG_LEVEL,lemmy_db_views_actor=$LEMMY_LOG_LEVEL,lemmy_db_views_moderator=$LEMMY_LOG_LEVEL,lemmy_routes=$LEMMY_LOG_LEVEL,lemmy_utils=$LEMMY_LOG_LEVEL,lemmy_websocket=$LEMMY_LOG_LEVEL"
|
||||||
|
|
||||||
export LEMMY_TEST_FAST_FEDERATION=1 # by default, the persistent federation queue has delays in the scale of 30s-5min
|
export LEMMY_TEST_FAST_FEDERATION=1 # by default, the persistent federation queue has delays in the scale of 30s-5min
|
||||||
|
|
||||||
|
@ -46,32 +51,35 @@ fi
|
||||||
|
|
||||||
echo "$PWD"
|
echo "$PWD"
|
||||||
|
|
||||||
|
LOG_DIR=target/log
|
||||||
|
mkdir -p $LOG_DIR
|
||||||
|
|
||||||
echo "start alpha"
|
echo "start alpha"
|
||||||
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_alpha.hjson \
|
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_alpha.hjson \
|
||||||
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_alpha" \
|
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_alpha" \
|
||||||
target/lemmy_server >/tmp/lemmy_alpha.out 2>&1 &
|
target/lemmy_server >$LOG_DIR/lemmy_alpha.out 2>&1 &
|
||||||
|
|
||||||
echo "start beta"
|
echo "start beta"
|
||||||
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_beta.hjson \
|
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_beta.hjson \
|
||||||
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_beta" \
|
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_beta" \
|
||||||
target/lemmy_server >/tmp/lemmy_beta.out 2>&1 &
|
target/lemmy_server >$LOG_DIR/lemmy_beta.out 2>&1 &
|
||||||
|
|
||||||
echo "start gamma"
|
echo "start gamma"
|
||||||
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_gamma.hjson \
|
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_gamma.hjson \
|
||||||
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_gamma" \
|
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_gamma" \
|
||||||
target/lemmy_server >/tmp/lemmy_gamma.out 2>&1 &
|
target/lemmy_server >$LOG_DIR/lemmy_gamma.out 2>&1 &
|
||||||
|
|
||||||
echo "start delta"
|
echo "start delta"
|
||||||
# An instance with only an allowlist for beta
|
# An instance with only an allowlist for beta
|
||||||
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_delta.hjson \
|
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_delta.hjson \
|
||||||
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_delta" \
|
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_delta" \
|
||||||
target/lemmy_server >/tmp/lemmy_delta.out 2>&1 &
|
target/lemmy_server >$LOG_DIR/lemmy_delta.out 2>&1 &
|
||||||
|
|
||||||
echo "start epsilon"
|
echo "start epsilon"
|
||||||
# An instance who has a blocklist, with lemmy-alpha blocked
|
# An instance who has a blocklist, with lemmy-alpha blocked
|
||||||
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_epsilon.hjson \
|
LEMMY_CONFIG_LOCATION=./docker/federation/lemmy_epsilon.hjson \
|
||||||
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_epsilon" \
|
LEMMY_DATABASE_URL="${LEMMY_DATABASE_URL}/lemmy_epsilon" \
|
||||||
target/lemmy_server >/tmp/lemmy_epsilon.out 2>&1 &
|
target/lemmy_server >$LOG_DIR/lemmy_epsilon.out 2>&1 &
|
||||||
|
|
||||||
echo "wait for all instances to start"
|
echo "wait for all instances to start"
|
||||||
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'lemmy-alpha:8541/api/v3/site')" != "200" ]]; do sleep 1; done
|
while [[ "$(curl -s -o /dev/null -w '%{http_code}' 'lemmy-alpha:8541/api/v3/site')" != "200" ]]; do sleep 1; done
|
||||||
|
|
Loading…
Reference in a new issue