Skip to content

Commit

Permalink
add "db" to /etc/hosts for github CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
jwong-dayspring committed May 21, 2024
1 parent d3ef5fa commit 389ae6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ jobs:
run: |
echo "SET GLOBAL sql_mode = ''" | mysql -u root -proot mysql
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 db" | sudo tee -a /etc/hosts
- name: setup database
run: |
sh -c "if [ '$DB' = 'mysql' ]; then mysql -u root -proot mysql -e 'SET FOREIGN_KEY_CHECKS = 0; DROP DATABASE IF EXISTS test; DROP SCHEMA IF EXISTS second_hand_books; DROP SCHEMA IF EXISTS contest; DROP DATABASE IF EXISTS reverse_bookstore; DROP SCHEMA IF EXISTS bookstore_schemas; SET FOREIGN_KEY_CHECKS = 1;'; fi"
Expand Down

0 comments on commit 389ae6f

Please sign in to comment.