Skip to content

Commit

Permalink
fix: fix ci (openemr#7614)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller authored Aug 4, 2024
1 parent b3dd874 commit 7635e37
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 34 deletions.
1 change: 0 additions & 1 deletion ci/apache_81_114/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_82_114/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_1011/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_105/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_106/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_111/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_112/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_114/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_57/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_80/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/apache_83_84/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
38 changes: 19 additions & 19 deletions ci/ciLibrary.source
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ composer_github_auth() {
dockers_env_start() {
failTest=false
cd ci/${DOCKER_DIR} || failTest=true
docker-compose up -d || failTest=true
docker compose up -d || failTest=true
cd ../../ || failTest=true
if $failTest; then
exit 1
Expand Down Expand Up @@ -70,22 +70,22 @@ install_configure() {
sudo chmod 666 sites/default/sqlconf.php || failTest=true
sudo chmod -R 777 sites/default/documents || failTest=true
sed -e 's@^exit;@ @' < contrib/util/installScripts/InstallerAuto.php > contrib/util/installScripts/InstallerAutoTemp.php || failTest=true
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "php -f ${OPENEMR_DIR}/contrib/util/installScripts/InstallerAutoTemp.php rootpass=root server=mysql loginhost=%" || failTest=true
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "rm -f ${OPENEMR_DIR}/contrib/util/installScripts/InstallerAutoTemp.php" || failTest=true
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "INSERT INTO product_registration (opt_out) VALUES (1)" openemr' || failTest=true
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 1 WHERE gl_name = \"rest_api\"" openemr' || failTest=true
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 1 WHERE gl_name = \"rest_fhir_api\"" openemr' || failTest=true
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 1 WHERE gl_name = \"rest_portal_api\"" openemr' || failTest=true
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 3 WHERE gl_name = \"oauth_password_grant\"" openemr' || failTest=true
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 1 WHERE gl_name = \"rest_system_scopes_api\"" openemr' || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "php -f ${OPENEMR_DIR}/contrib/util/installScripts/InstallerAutoTemp.php rootpass=root server=mysql loginhost=%" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "rm -f ${OPENEMR_DIR}/contrib/util/installScripts/InstallerAutoTemp.php" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "INSERT INTO product_registration (opt_out) VALUES (1)" openemr' || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 1 WHERE gl_name = \"rest_api\"" openemr' || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 1 WHERE gl_name = \"rest_fhir_api\"" openemr' || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 1 WHERE gl_name = \"rest_portal_api\"" openemr' || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 3 WHERE gl_name = \"oauth_password_grant\"" openemr' || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c 'mysql -u openemr --password="openemr" -h mysql -e "UPDATE globals SET gl_value = 1 WHERE gl_name = \"rest_system_scopes_api\"" openemr' || failTest=true
if $failTest; then
exit 1
fi
}

build_test_unit() {
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite unit --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite unit --testdox" || failTest=true
if $failTest; then
exit 1
fi
Expand All @@ -95,19 +95,19 @@ build_test_e2e() {
# Since e2e testing is a bit inconsistent, gonna do up to three runs (and only one needs to pass to pass the e2e testing)
# first run
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "${CHROMIUM_INSTALL}; export PANTHER_NO_SANDBOX=1; export PANTHER_CHROME_ARGUMENTS='--disable-dev-shm-usage'; cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite e2e --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "${CHROMIUM_INSTALL}; export PANTHER_NO_SANDBOX=1; export PANTHER_CHROME_ARGUMENTS='--disable-dev-shm-usage'; cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite e2e --testdox" || failTest=true
if [ "$failTest" == false ]; then
exit
fi
# try run again
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "${CHROMIUM_INSTALL}; export PANTHER_NO_SANDBOX=1; export PANTHER_CHROME_ARGUMENTS='--disable-dev-shm-usage'; cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite e2e --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "${CHROMIUM_INSTALL}; export PANTHER_NO_SANDBOX=1; export PANTHER_CHROME_ARGUMENTS='--disable-dev-shm-usage'; cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite e2e --testdox" || failTest=true
if [ "$failTest" == false ]; then
exit
fi
# hail mary run
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "${CHROMIUM_INSTALL}; export PANTHER_NO_SANDBOX=1; export PANTHER_CHROME_ARGUMENTS='--disable-dev-shm-usage'; cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite e2e --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "${CHROMIUM_INSTALL}; export PANTHER_NO_SANDBOX=1; export PANTHER_CHROME_ARGUMENTS='--disable-dev-shm-usage'; cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite e2e --testdox" || failTest=true
if [ "$failTest" == false ]; then
exit
fi
Expand All @@ -117,47 +117,47 @@ build_test_e2e() {

build_test_api() {
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite api --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite api --testdox" || failTest=true
if $failTest; then
exit 1
fi
}

build_test_fixtures() {
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite fixtures --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite fixtures --testdox" || failTest=true
if $failTest; then
exit 1
fi
}

build_test_services() {
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite services --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite services --testdox" || failTest=true
if $failTest; then
exit 1
fi
}

build_test_validators() {
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite validators --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite validators --testdox" || failTest=true
if $failTest; then
exit 1
fi
}

build_test_controllers() {
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite controllers --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite controllers --testdox" || failTest=true
if $failTest; then
exit 1
fi
}

build_test_common() {
failTest=false
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite common --testdox" || failTest=true
docker exec -i $(docker ps | grep openemr- | cut -f 1 -d " ") sh -c "cd ${OPENEMR_DIR}; php ${OPENEMR_DIR}/vendor/bin/phpunit --testsuite common --testdox" || failTest=true
if $failTest; then
exit 1
fi
Expand Down
1 change: 0 additions & 1 deletion ci/nginx_81/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/nginx_82/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/nginx_83/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down
1 change: 0 additions & 1 deletion ci/nginx_84/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# docker-compose.yml for travis ci testing
version: '3.1'
services:
mysql:
restart: always
Expand Down

0 comments on commit 7635e37

Please sign in to comment.