[DEV-190] Fix tests in Github Actions (#1217)
* Silly test * Add better debugging, try starting service * Try stopping and re-starting the mysql service, the old way * Check status before running MySQL command * Now that indeed mysql is not started, make it start * [DEV-190] Try removing background-running of make run * Ignore mysql service when not running at the beginning * [DEV-190] Mount folder with instructions on how to initialize * [DEV-190] Go back to using normal make run * Adding -v command to mount volume with init scripts * Remove SSH terminal to Github Actions instance * Remove enabling of MySQL * Remove unnecessary parts from Makefile
This commit is contained in:
parent
b620baf5ed
commit
8c732f5dda
|
@ -0,0 +1 @@
|
|||
mysql -u root -e "CREATE DATABASE IF NOT EXISTS development;"
|
|
@ -11,18 +11,17 @@ build:
|
|||
|
||||
install:
|
||||
@docker exec -it opensupports-srv bash -c "cd /var/www/html && composer install" || echo "${red}Please execute 'make run' first${reset}"
|
||||
@docker exec -u root -it opensupports-db bash -c "service mysql start; mysql -u root -e \"CREATE DATABASE IF NOT EXISTS development;\" " || echo "${red}Please execute 'make run' first${reset}"
|
||||
@docker exec -u root -it opensupports-db bash -c "mysql -u root -e \"CREATE DATABASE IF NOT EXISTS development;\" " || echo "${red}Please execute 'make run' first${reset}"
|
||||
|
||||
install-not-interactive:
|
||||
@docker exec opensupports-srv bash -c "cd /var/www/html && composer install" || echo "${red}Please execute 'make run' first${reset}"
|
||||
@docker exec -u root opensupports-db bash -c "service mysql start; mysql -u root -e \"CREATE DATABASE IF NOT EXISTS development;\" " || echo "${red}Please execute 'make run' first${reset}"
|
||||
docker exec opensupports-srv bash -c "cd /var/www/html && composer install" || echo "${red}Please execute 'make run' first${reset}"
|
||||
|
||||
setup-vendor-permissions:
|
||||
@docker exec opensupports-srv bash -c "cd /var/www/html && chmod 777 -R vendor/ezyang" || echo "${red}Please execute 'make run' first${reset}"
|
||||
@docker exec opensupports-srv bash -c "cd /var/www/html && chmod 777 -R files" || echo "${red}Please execute 'make run' first${reset}"
|
||||
|
||||
run: stop
|
||||
@docker run --platform=linux/amd64 -d --network os-net --name opensupports-db -p 4040:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -v $(PWD)/.dbdata/:/var/lib/mysql mysql:5.6
|
||||
@docker run --platform=linux/amd64 -d --network os-net --name opensupports-db -p 4040:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -v $(PWD)/.dbdata/:/var/lib/mysql -v $(PWD)/.start-db:/docker-entrypoint-initdb.d mysql:5.6
|
||||
@docker run --platform=linux/amd64 -d --network os-net --name opensupports-myadmin --link opensupports-db:db -p 6060:80 phpmyadmin/phpmyadmin
|
||||
@docker run --platform=linux/amd64 -d --network os-net --name opensupports-fakesmtp -p 7070:25 -v ${PWD}/.fakemail/:/var/mail munkyboy/fakesmtp
|
||||
@docker run --platform=linux/amd64 -d --network os-net --name opensupports-srv -p 8080:80 --link opensupports-db:mysql --rm -e LOG_STDOUT=true -e LOG_STDERR=true -e LOG_LEVEL=debug -v ${PWD}:/var/www/html opensupports-srv
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#!/bin/bash
|
||||
# DELETE ALL TABLES
|
||||
service mysql start;
|
||||
TABLES=$(mysql --host ${MYSQL_HOST} --port ${MYSQL_PORT} -u root development -e "SHOW TABLES IN development;" | awk '{ print $1}' | grep -v '^Tables')
|
||||
|
||||
for t in $TABLES
|
||||
|
|
Loading…
Reference in New Issue