-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start running a few tests using appveyor.
- Loading branch information
Showing
6 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
image: | ||
- Ubuntu1604 | ||
- Ubuntu1804 | ||
|
||
stack: node 10, mysql, redis | ||
|
||
install: | ||
- yarn | ||
- bash ./sh/appveyor.sh | ||
- sudo service mysql restart | ||
|
||
build: off | ||
|
||
services: | ||
- mysql | ||
- redis | ||
|
||
environment: | ||
DB_PASS: Password12! | ||
DB_HOST: localhost | ||
DB_USER: root | ||
DB_NAME: bhima_test | ||
|
||
test_script: | ||
- yarn build | ||
- yarn build:db | ||
- yarn test:server-unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env bash | ||
|
||
## | ||
## This script is for Appveyor CI to configure and install required software. | ||
## | ||
|
||
## mysql is installed by default on appveyor, so we can set mysql server charset as utf8mb4 | ||
echo -e " | ||
[client] | ||
default-character-set=utf8mb4 | ||
[mysql] | ||
default-character-set=utf8mb4 | ||
[mysqld] | ||
collation-server=utf8mb4_unicode_ci | ||
init-connect='SET NAMES utf8mb4' | ||
character-set-server=utf8mb4 | ||
sql-mode=\"STRICT_ALL_TABLES\" " | sudo tee -a /etc/mysql/conf.d/99_custom_travis.cnf | ||
|
||
## set database environment | ||
set -euo pipefail | ||
|
||
set -a | ||
source .env.development | ||
set +a | ||
|
||
ROOT_DB_PASS="Password12!" | ||
|
||
# setup usernames and permissions | ||
mysql -h $DB_HOST -u root -p$ROOT_DB_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$DB_USER'@'$DB_HOST' IDENTIFIED BY '$DB_PASS' WITH GRANT OPTION;" | ||
mysql -h $DB_HOST -u root -p$ROOT_DB_PASS -e "FLUSH PRIVILEGES;" | ||
|
||
# download and install wkhtmltopdf globally | ||
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | ||
tar -xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | ||
sudo mv ./wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
## | ||
## This script is for Travis CI to configure and install required software. | ||
## | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters