Update registration and authentication defaults to disable privacy policy and terms acceptance
Some checks are pending
CI / check-phpdoc (push) Waiting to run
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / release_executable (push) Waiting to run
CI / debug_executable (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
Some checks are pending
CI / check-phpdoc (push) Waiting to run
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / release_executable (push) Waiting to run
CI / debug_executable (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
This commit is contained in:
parent
cdb28f841f
commit
f80ab103a9
2 changed files with 26 additions and 73 deletions
89
.github/workflows/ncc_workflow.yml
vendored
89
.github/workflows/ncc_workflow.yml
vendored
|
@ -279,8 +279,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: php:8.3
|
image: php:8.3
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
if: needs.check-phpunit.outputs.phpunit-exists == 'true'
|
if: needs.check-phpunit.outputs.phpunit-exists == 'true'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -335,94 +333,49 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker-compose -f docker-compose.test.yml build
|
docker-compose -f docker-compose.test.yml build
|
||||||
|
|
||||||
- name: Prepare for volume mounting
|
- name: Run PHPUnit tests
|
||||||
run: |
|
|
||||||
# Define workspace path as current directory
|
|
||||||
WORKSPACE_PATH=$(pwd)
|
|
||||||
echo "Using workspace path: $WORKSPACE_PATH"
|
|
||||||
|
|
||||||
# Ensure directories exist and have appropriate permissions
|
|
||||||
mkdir -p tests/docker/coffee/logs tests/docker/teapot/logs
|
|
||||||
chmod -R 777 tests/docker
|
|
||||||
|
|
||||||
# Create a new docker-compose file with absolute paths
|
|
||||||
cat docker-compose.test.yml | sed "s|- \./tests/docker/|- $WORKSPACE_PATH/tests/docker/|g" > docker-compose.test.absolute.yml
|
|
||||||
|
|
||||||
# Debug output to verify the changes
|
|
||||||
echo "Original volume path entries:"
|
|
||||||
grep -A 2 "volumes:" docker-compose.test.yml | head -10
|
|
||||||
|
|
||||||
echo "Updated volume path entries with absolute paths:"
|
|
||||||
grep -A 2 "volumes:" docker-compose.test.absolute.yml | head -10
|
|
||||||
|
|
||||||
# Use the updated docker-compose file
|
|
||||||
cp docker-compose.test.absolute.yml docker-compose.test.yml
|
|
||||||
|
|
||||||
# Debug: Show docker info and current directory structure
|
|
||||||
docker info
|
|
||||||
ls -la
|
|
||||||
ls -la tests/docker/
|
|
||||||
|
|
||||||
- name: Start Docker services with host networking
|
|
||||||
run: |
|
|
||||||
# Start services with host networking
|
|
||||||
docker-compose -f docker-compose.test.yml up -d
|
|
||||||
env:
|
|
||||||
COMPOSE_DOCKER_CLI_BUILD: 1
|
|
||||||
DOCKER_BUILDKIT: 1
|
|
||||||
DOCKER_HOST: "unix:///var/run/docker.sock"
|
|
||||||
|
|
||||||
- name: Verify container logs and mounts
|
|
||||||
run: |
|
|
||||||
# List running containers
|
|
||||||
docker ps
|
|
||||||
|
|
||||||
# Check if services are running properly
|
|
||||||
docker-compose -f docker-compose.test.yml logs
|
|
||||||
|
|
||||||
# Verify the volumes are mounted correctly
|
|
||||||
for container in $(docker-compose -f docker-compose.test.yml ps -q); do
|
|
||||||
echo "Inspecting container $container:"
|
|
||||||
docker inspect -f '{{ .Mounts }}' $container
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Wait for services to be ready
|
|
||||||
run: |
|
run: |
|
||||||
check_service() {
|
check_service() {
|
||||||
local port=$1
|
local port=$1
|
||||||
local max_attempts=30
|
local max_attempts=30
|
||||||
local wait_seconds=2
|
local wait_seconds=2
|
||||||
local attempt=1
|
local attempt=1
|
||||||
|
|
||||||
while [ $attempt -le $max_attempts ]; do
|
while [ $attempt -le $max_attempts ]; do
|
||||||
echo "Checking service on port $port (attempt $attempt/$max_attempts)..."
|
echo "Checking service on port $port (attempt $attempt/$max_attempts)..."
|
||||||
if curl -s -o /dev/null -w "%{http_code}" -H "Request-Type: ping" http://172.17.0.1:$port | grep -q "200"; then
|
if curl -s -o /dev/null -w "%{http_code}" -H "Request-Type: ping" http://172.17.0.1:$port | grep -q "200"; then
|
||||||
echo "Service on port $port is available!"
|
echo "Service on port $port is available!"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Service on port $port not yet available. Waiting ${wait_seconds}s before next attempt..."
|
echo "Service on port $port not yet available. Waiting ${wait_seconds}s before next attempt..."
|
||||||
sleep $wait_seconds
|
sleep $wait_seconds
|
||||||
attempt=$((attempt + 1))
|
attempt=$((attempt + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Error: Service on port $port not available after $max_attempts attempts"
|
echo "Error: Service on port $port not available after $max_attempts attempts"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
check_service 8087 || exit 1
|
|
||||||
check_service 8086 || exit 1
|
|
||||||
|
|
||||||
- name: Run PHPUnit tests
|
|
||||||
run: |
|
|
||||||
# Prepare phpunit
|
# Prepare phpunit
|
||||||
wget https://phar.phpunit.de/phpunit-11.3.phar
|
wget https://phar.phpunit.de/phpunit-11.3.phar
|
||||||
|
docker-compose -f docker-compose.test.yml up -d
|
||||||
|
check_service 8087 || exit 1
|
||||||
|
check_service 8086 || exit 1
|
||||||
|
|
||||||
# Run the tests
|
# Run the tests and tare down the test environment
|
||||||
php phpunit-11.3.phar --configuration phpunit.xml --log-junit reports/junit.xml --log-teamcity reports/teamcity --testdox-html reports/testdox.html --testdox-text reports/testdox.txt
|
php phpunit-11.3.phar --configuration phpunit.xml --log-junit reports/junit.xml --log-teamcity reports/teamcity --testdox-html reports/testdox.html --testdox-text reports/testdox.txt
|
||||||
|
|
||||||
- name: Teardown test environment
|
for file in $(docker exec coffee_socialbox find /var/log -type f); do
|
||||||
run: |
|
mkdir -p coffee_logs
|
||||||
|
docker exec coffee_socialbox cat "$file" > "coffee_logs/$(basename "$file")"
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in $(docker exec teapot_socialbox find /var/log -type f); do
|
||||||
|
mkdir -p teapot_logs
|
||||||
|
docker exec teapot_socialbox cat "$file" > "teapot_logs/$(basename "$file")"
|
||||||
|
done
|
||||||
|
|
||||||
docker-compose -f docker-compose.test.yml down
|
docker-compose -f docker-compose.test.yml down
|
||||||
|
|
||||||
- name: Upload test reports
|
- name: Upload test reports
|
||||||
|
@ -435,13 +388,13 @@ jobs:
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coffee_logs
|
name: coffee_logs
|
||||||
path: tests/docker/coffee/logs
|
path: coffee_logs
|
||||||
|
|
||||||
- name: Upload teapot test logs
|
- name: Upload teapot test logs
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: teapot_logs
|
name: teapot_logs
|
||||||
path: tests/docker/teapot/logs
|
path: teapot_logs
|
||||||
|
|
||||||
|
|
||||||
release-documentation:
|
release-documentation:
|
||||||
|
|
|
@ -122,13 +122,13 @@
|
||||||
$config->setDefault('registration.enabled', true);
|
$config->setDefault('registration.enabled', true);
|
||||||
$config->setDefault('registration.privacy_policy_document', null);
|
$config->setDefault('registration.privacy_policy_document', null);
|
||||||
$config->setDefault('registration.privacy_policy_date', 1734985525);
|
$config->setDefault('registration.privacy_policy_date', 1734985525);
|
||||||
$config->setDefault('registration.accept_privacy_policy', true);
|
$config->setDefault('registration.accept_privacy_policy', false);
|
||||||
$config->setDefault('registration.terms_of_service_document', null);
|
$config->setDefault('registration.terms_of_service_document', null);
|
||||||
$config->setDefault('registration.terms_of_service_date', 1734985525);
|
$config->setDefault('registration.terms_of_service_date', 1734985525);
|
||||||
$config->setDefault('registration.accept_terms_of_service', true);
|
$config->setDefault('registration.accept_terms_of_service', false);
|
||||||
$config->setDefault('registration.community_guidelines_document', null);
|
$config->setDefault('registration.community_guidelines_document', null);
|
||||||
$config->setDefault('registration.community_guidelines_date', 1734985525);
|
$config->setDefault('registration.community_guidelines_date', 1734985525);
|
||||||
$config->setDefault('registration.accept_community_guidelines', true);
|
$config->setDefault('registration.accept_community_guidelines', false);
|
||||||
$config->setDefault('registration.password_required', true);
|
$config->setDefault('registration.password_required', true);
|
||||||
$config->setDefault('registration.otp_required', false);
|
$config->setDefault('registration.otp_required', false);
|
||||||
$config->setDefault('registration.display_name_required', true);
|
$config->setDefault('registration.display_name_required', true);
|
||||||
|
@ -140,11 +140,11 @@
|
||||||
$config->setDefault('registration.phone_number_required', false);
|
$config->setDefault('registration.phone_number_required', false);
|
||||||
$config->setDefault('registration.birthday_required', false);
|
$config->setDefault('registration.birthday_required', false);
|
||||||
$config->setDefault('registration.url_required', false);
|
$config->setDefault('registration.url_required', false);
|
||||||
$config->setDefault('registration.image_captcha_verification_required', true);
|
$config->setDefault('registration.image_captcha_verification_required', false);
|
||||||
|
|
||||||
// Authentication configuration
|
// Authentication configuration
|
||||||
$config->setDefault('authentication.enabled', true);
|
$config->setDefault('authentication.enabled', true);
|
||||||
$config->setDefault('authentication.image_captcha_verification_required', true);
|
$config->setDefault('authentication.image_captcha_verification_required', false);
|
||||||
|
|
||||||
// Server Policies
|
// Server Policies
|
||||||
// The maximum number of signing keys a peer can register onto the server at once
|
// The maximum number of signing keys a peer can register onto the server at once
|
||||||
|
|
Loading…
Add table
Reference in a new issue