mirror of
https://github.com/cytopia/devilbox.git
synced 2025-02-20 17:33:05 +00:00
Run CI steps even if previous ones failed
This commit is contained in:
parent
de89a170e7
commit
f4ddbfb15e
22
.github/workflows/ci-smoke-linux.yml
vendored
22
.github/workflows/ci-smoke-linux.yml
vendored
@ -127,63 +127,85 @@ jobs:
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-modules
|
||||
if: success() || failure()
|
||||
|
||||
- name: Test Config
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-config
|
||||
if: success() || failure()
|
||||
|
||||
- name: Test Intranet
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-intranet
|
||||
if: success() || failure()
|
||||
|
||||
- name: Test Vendors
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-vendors
|
||||
if: success() || failure()
|
||||
|
||||
- name: Test Vhosts
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-vhosts
|
||||
if: success() || failure()
|
||||
|
||||
- name: Test Reverse Proxy
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-rproxies
|
||||
if: success() || failure()
|
||||
|
||||
- name: Test SSL
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-ssl
|
||||
if: success() || failure()
|
||||
|
||||
- name: Test Bind
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-bind
|
||||
if: success() || failure()
|
||||
|
||||
- name: Test Autostart
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-autostart
|
||||
if: success() || failure()
|
||||
|
||||
- name: "Test Framework: CakePHP"
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-framework-cakephp
|
||||
if: success() || failure()
|
||||
|
||||
- name: "Test Framework: Drupal"
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make test-smoke-framework-drupal
|
||||
if: success() || failure()
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# Finish
|
||||
# ------------------------------------------------------------
|
||||
|
||||
- name: "Finish: Docker logs"
|
||||
shell: bash
|
||||
run: |
|
||||
cd .tests/
|
||||
make logs
|
||||
if: success() || failure()
|
||||
|
@ -73,7 +73,7 @@ until curl -sS --fail "http://localhost:${HOST_PORT_HTTPD}" 2>/dev/null | grep '
|
||||
i=$(( i + 1 ))
|
||||
if [ "${i}" -eq "60" ]; then
|
||||
printf "[FAIL]\\n"
|
||||
curl "http://localhost:${HOST_PORT_HTTPD}"
|
||||
curl -sS "http://localhost:${HOST_PORT_HTTPD}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -50,7 +50,7 @@ HOST_PORT_HTTPD="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HOST_PORT_HTTPD"
|
||||
printf "[TEST] Xdebug available"
|
||||
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep -q 'xdebug.remote_enable'" "${RETRIES}" "" "0"; then
|
||||
printf "\\r[FAIL] Xdebug available\\n"
|
||||
curl "http://localhost:${HOST_PORT_HTTPD}/info_php.php" || true
|
||||
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' || true"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] Xdebug available\\n"
|
||||
@ -63,7 +63,7 @@ fi
|
||||
printf "[TEST] Xdebug default disabled"
|
||||
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_enable' | grep -Eq 'Off.+Off'" "${RETRIES}" "" "0"; then
|
||||
printf "\\r[FAIL] Xdebug default disabled\\n"
|
||||
curl "http://localhost:${HOST_PORT_HTTPD}/info_php.php | grep 'xdebug.remote_enable'" || true
|
||||
run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_enable' || true"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] Xdebug default disabled\\n"
|
||||
@ -76,7 +76,7 @@ fi
|
||||
printf "[TEST] Xdebug autostart disabled"
|
||||
if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | tac | tac | grep 'xdebug.remote_autostart' | grep -Eq 'Off.+Off'" "${RETRIES}" "" "0"; then
|
||||
printf "\\r[FAIL] Xdebug autostart disabled\\n"
|
||||
curl "http://localhost:${HOST_PORT_HTTPD}/info_php.php | grep 'xdebug.remote_autostart'" || true
|
||||
run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_php.php' | grep 'xdebug.remote_autostart' || true"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] Xdebug autostart disabled\\n"
|
||||
|
@ -75,6 +75,7 @@ TLD_SUFFIX="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "TLD_SUFFIX" )"
|
||||
### Get vhost files
|
||||
###
|
||||
FILES="$( find "${TESTS}" -name '*.php' | sort )"
|
||||
ERRORS=0
|
||||
|
||||
|
||||
echo
|
||||
@ -87,12 +88,12 @@ for file in ${FILES}; do
|
||||
name="$( basename "${file}" )"
|
||||
|
||||
if ! run "curl -sS --fail --header 'Host: ${VHOST}.${TLD_SUFFIX}' 'http://localhost:${HOST_PORT_HTTPD}/${name}' | tac | tac | grep -E '^OK$' >/dev/null" "${RETRIES}"; then
|
||||
run "curl --header 'Host: ${VHOST}.${TLD_SUFFIX}' 'http://localhost:${HOST_PORT_HTTPD}/${name}'"
|
||||
exit 1
|
||||
run "curl -sS --header 'Host: ${VHOST}.${TLD_SUFFIX}' 'http://localhost:${HOST_PORT_HTTPD}/${name}'"
|
||||
ERRORS="$(( ERRORS + 1))"
|
||||
fi
|
||||
if ! run_fail "curl -sS --fail --header 'Host: ${VHOST}.${TLD_SUFFIX}' 'http://localhost:${HOST_PORT_HTTPD}/${name}' 2>&1 | tac | tac | grep -Ei 'fatal|except|err|warn|notice' >/dev/null" "${RETRIES}"; then
|
||||
run "curl --header 'Host: ${VHOST}.${TLD_SUFFIX}' 'http://localhost:${HOST_PORT_HTTPD}/${name}'"
|
||||
exit 1
|
||||
run "curl -sS --header 'Host: ${VHOST}.${TLD_SUFFIX}' 'http://localhost:${HOST_PORT_HTTPD}/${name}'"
|
||||
ERRORS="$(( ERRORS + 1))"
|
||||
fi
|
||||
done
|
||||
|
||||
@ -108,10 +109,12 @@ for file in ${FILES}; do
|
||||
|
||||
if ! run "docker-compose exec -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}:${HOST_PORT_HTTPD}/${name}' | tac | tac | grep -E '^OK$' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}"; then
|
||||
run "docker-compose exec -T php curl 'http://${VHOST}.${TLD_SUFFIX}:${HOST_PORT_HTTPD}/${name}'" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
ERRORS="$(( ERRORS + 1))"
|
||||
fi
|
||||
if ! run_fail "docker-compose exec -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}:${HOST_PORT_HTTPD}/${name}' 2>&1 | tac | tac | grep -Ei 'fatal|except|err|war|notice' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}"; then
|
||||
run "docker-compose exec -T php curl 'http://${VHOST}.${TLD_SUFFIX}:${HOST_PORT_HTTPD}/${name}'" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
ERRORS="$(( ERRORS + 1))"
|
||||
fi
|
||||
done
|
||||
|
||||
exit "${ERRORS}"
|
||||
|
@ -91,7 +91,7 @@ fi
|
||||
printf "[TEST] https vhost / from container"
|
||||
if ! run "docker-compose exec -T php curl -sS --fail 'https://${VHOST}.${TLD_SUFFIX}' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}" "0"; then
|
||||
printf "\\r[FAIL] https vhost / from container\\n"
|
||||
run "docker-compose exec -T php curl -sv 'https://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}" "0"
|
||||
run "docker-compose exec -T php curl -v 'https://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}" "0"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] https vhost / from container\\n"
|
||||
|
@ -51,8 +51,6 @@ fi
|
||||
###
|
||||
### Get required env values
|
||||
###
|
||||
HTTPD_SERVER="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_SERVER" )"
|
||||
HOST_PORT_HTTPD="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HOST_PORT_HTTPD" )"
|
||||
TLD_SUFFIX="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "TLD_SUFFIX" )"
|
||||
HTTPD_DOCROOT_DIR="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_DOCROOT_DIR" )"
|
||||
|
||||
@ -80,7 +78,7 @@ run "docker-compose exec --user devilbox -T php bash -c 'echo \"indexhtm\" > /sh
|
||||
printf "[TEST] index.htm should be served by default"
|
||||
if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep -E '^indexhtm$' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}" "0"; then
|
||||
printf "\\r[FAIL] index.htm should be served by default\\n"
|
||||
run "docker-compose exec --user devilbox -T php curl 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}"
|
||||
run "docker-compose exec --user devilbox -T php curl -sS 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] index.htm should be served by default\\n"
|
||||
@ -94,7 +92,7 @@ run "docker-compose exec --user devilbox -T php bash -c 'echo \"indexhtml\" > /s
|
||||
printf "[TEST] index.html should be served by default"
|
||||
if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep -E '^indexhtml$' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}" "0"; then
|
||||
printf "\\r[FAIL] index.html should be served by default\\n"
|
||||
run "docker-compose exec --user devilbox -T php curl 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}"
|
||||
run "docker-compose exec --user devilbox -T php curl -sS 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] index.html should be served by default\\n"
|
||||
@ -108,7 +106,7 @@ run "docker-compose exec --user devilbox -T php bash -c 'echo \"<?php echo \\\"i
|
||||
printf "[TEST] index.php should be served by default"
|
||||
if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep -E '^indexphp$' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}" "0"; then
|
||||
printf "\\r[FAIL] index.php should be served by default\\n"
|
||||
run "docker-compose exec --user devilbox -T php curl 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}"
|
||||
run "docker-compose exec --user devilbox -T php curl -sS 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] index.php should be served by default\\n"
|
||||
@ -122,7 +120,7 @@ fi
|
||||
printf "[TEST] index.htm is available via direct path"
|
||||
if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}/index.htm' | tac | tac | grep -E '^indexhtm$' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}" "0"; then
|
||||
printf "\\r[FAIL] index.htm is available via direct path\\n"
|
||||
run "docker-compose exec --user devilbox -T php curl 'http://${VHOST}.${TLD_SUFFIX}/index.htm' || true" "1" "${DVLBOX_PATH}"
|
||||
run "docker-compose exec --user devilbox -T php curl -sS 'http://${VHOST}.${TLD_SUFFIX}/index.htm' || true" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] index.htm is available via direct path\\n"
|
||||
@ -135,7 +133,7 @@ fi
|
||||
printf "[TEST] index.html is available via direct path"
|
||||
if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}/index.html' | tac | tac | grep -E '^indexhtml$' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}" "0"; then
|
||||
printf "\\r[FAIL] index.html is available via direct path\\n"
|
||||
run "docker-compose exec --user devilbox -T php curl 'http://${VHOST}.${TLD_SUFFIX}/index.html' || true" "1" "${DVLBOX_PATH}"
|
||||
run "docker-compose exec --user devilbox -T php curl -sS 'http://${VHOST}.${TLD_SUFFIX}/index.html' || true" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] index.html is available via direct path\\n"
|
||||
@ -148,7 +146,7 @@ fi
|
||||
printf "[TEST] index.php is available via direct path"
|
||||
if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}/index.php' | tac | tac | grep -E '^indexphp$' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}" "0"; then
|
||||
printf "\\r[FAIL] index.php is available via direct path\\n"
|
||||
run "docker-compose exec --user devilbox -T php curl 'http://${VHOST}.${TLD_SUFFIX}/index.php' || true" "1" "${DVLBOX_PATH}"
|
||||
run "docker-compose exec --user devilbox -T php curl -sS 'http://${VHOST}.${TLD_SUFFIX}/index.php' || true" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] index.php is available via direct path\\n"
|
||||
|
@ -56,8 +56,6 @@ fi
|
||||
###
|
||||
### Get required env values
|
||||
###
|
||||
HTTPD_SERVER="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_SERVER" )"
|
||||
HOST_PORT_HTTPD="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HOST_PORT_HTTPD" )"
|
||||
TLD_SUFFIX="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "TLD_SUFFIX" )"
|
||||
HTTPD_DOCROOT_DIR="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_DOCROOT_DIR" )"
|
||||
HTTPD_TEMPLATE_DIR="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_TEMPLATE_DIR" )"
|
||||
@ -118,7 +116,7 @@ run "sleep 4"
|
||||
printf "[TEST] index.html should be served"
|
||||
if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep -E '^indexhtml$' >/dev/null" "${RETRIES}" "${DVLBOX_PATH}" "0"; then
|
||||
printf "\\r[FAIL] index.html should be served\\n"
|
||||
run "docker-compose exec --user devilbox -T php curl 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}"
|
||||
run "docker-compose exec --user devilbox -T php curl -sS 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}"
|
||||
exit 1
|
||||
else
|
||||
printf "\\r[OK] index.html should be served\\n"
|
||||
|
@ -56,10 +56,7 @@ fi
|
||||
###
|
||||
### Get required env values
|
||||
###
|
||||
HTTPD_SERVER="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_SERVER" )"
|
||||
HOST_PORT_HTTPD="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HOST_PORT_HTTPD" )"
|
||||
TLD_SUFFIX="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "TLD_SUFFIX" )"
|
||||
HTTPD_DOCROOT_DIR="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_DOCROOT_DIR" )"
|
||||
HTTPD_TEMPLATE_DIR="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_TEMPLATE_DIR" )"
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user