Refactor docker-compose setup to use named volumes and prepare test environment
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
26334c205d
commit
76ab0143dc
1 changed files with 37 additions and 0 deletions
37
.github/workflows/ncc_workflow.yml
vendored
37
.github/workflows/ncc_workflow.yml
vendored
|
@ -357,6 +357,43 @@ jobs:
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Prepare the environment
|
||||||
|
chmod -R 777 tests/docker
|
||||||
|
|
||||||
|
# Modify volume mounts to use named volumes
|
||||||
|
sed -i 's|./tests/docker/coffee/config:/etc/config:z|coffee_config_volume:/etc/config:z|g' docker-compose.test.yml
|
||||||
|
sed -i 's|./tests/docker/coffee/data:/etc/socialbox:z|coffee_data_volume:/etc/socialbox:z|g' docker-compose.test.yml
|
||||||
|
sed -i 's|./tests/docker/coffee/logs:/var/log:z|coffee_logs_volume:/var/log:z|g' docker-compose.test.yml
|
||||||
|
|
||||||
|
sed -i 's|./tests/docker/teapot/config:/etc/config:z|teapot_config_volume:/etc/config:z|g' docker-compose.test.yml
|
||||||
|
sed -i 's|./tests/docker/teapot/data:/etc/socialbox:z|teapot_data_volume:/etc/socialbox:z|g' docker-compose.test.yml
|
||||||
|
sed -i 's|./tests/docker/teapot/logs:/var/log:z|teapot_logs_volume:/var/log:z|g' docker-compose.test.yml
|
||||||
|
|
||||||
|
# Add the named volumes to the volumes section
|
||||||
|
echo " coffee_config_volume:" >> docker-compose.test.yml
|
||||||
|
echo " driver: local" >> docker-compose.test.yml
|
||||||
|
echo " coffee_data_volume:" >> docker-compose.test.yml
|
||||||
|
echo " driver: local" >> docker-compose.test.yml
|
||||||
|
echo " coffee_logs_volume:" >> docker-compose.test.yml
|
||||||
|
echo " driver: local" >> docker-compose.test.yml
|
||||||
|
echo " teapot_config_volume:" >> docker-compose.test.yml
|
||||||
|
echo " driver: local" >> docker-compose.test.yml
|
||||||
|
echo " teapot_data_volume:" >> docker-compose.test.yml
|
||||||
|
echo " driver: local" >> docker-compose.test.yml
|
||||||
|
echo " teapot_logs_volume:" >> docker-compose.test.yml
|
||||||
|
echo " driver: local" >> docker-compose.test.yml
|
||||||
|
|
||||||
|
# Copy files to a temporary location that can be mounted
|
||||||
|
mkdir -p /tmp/coffee/config /tmp/coffee/data /tmp/coffee/logs
|
||||||
|
mkdir -p /tmp/teapot/config /tmp/teapot/data /tmp/teapot/logs
|
||||||
|
|
||||||
|
cp -r tests/docker/coffee/config/* /tmp/coffee/config/ || true
|
||||||
|
cp -r tests/docker/coffee/data/* /tmp/coffee/data/ || true
|
||||||
|
cp -r tests/docker/teapot/config/* /tmp/teapot/config/ || true
|
||||||
|
cp -r tests/docker/teapot/data/* /tmp/teapot/data/ || true
|
||||||
|
|
||||||
|
cat docker-compose.test.yml
|
||||||
|
|
||||||
# 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
|
docker-compose -f docker-compose.test.yml up -d
|
||||||
|
|
Loading…
Add table
Reference in a new issue