Skip to content

Commit

Permalink
Fix db schema
Browse files Browse the repository at this point in the history
Revert previous commit
  • Loading branch information
juherr committed Jul 27, 2023
1 parent 0e42d20 commit 98b125e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ jobs:
distribution: 'temurin'
cache: maven

- name: Set up MySQL
- name: Set up MySQL for tests
run: |
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "SELECT @@VERSION;"
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "CREATE DATABASE stevedb_test_2aa6a783d47d;" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "CREATE USER 'steve'@'%' IDENTIFIED BY 'changeme';" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT ALL PRIVILEGES ON stevedb_test_2aa6a783d47d.* TO 'steve'@'%';" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SELECT ON mysql.proc TO 'steve'@'%';" -v || true
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SUPER ON *.* TO 'steve'@'%';" -v || true
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "CREATE DATABASE $DB_SCHEMA;" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "CREATE USER '$DB_USER'@'%' IDENTIFIED BY '$DB_PASSWORD';" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT ALL PRIVILEGES ON $DB_SCHEMA.* TO '$DB_USER'@'%';" -v
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SELECT ON mysql.proc TO '$DB_USER'@'%';" -v || true
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SUPER ON *.* TO '$DB_USER'@'%';" -v || true
env:
DB_USER: steve
DB_PASSWORD: changeme
DB_SCHEMA: stevedb

- name: Build with Maven
run: ./mvnw -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/config/test/main.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ context.path = steve
#
db.ip = localhost
db.port = 3306
db.schema = stevedb_test_2aa6a783d47d
db.user = root
db.password = root
db.schema = stevedb
db.user = steve
db.password = changeme

# Credentials for Web interface access
#
Expand Down

0 comments on commit 98b125e

Please sign in to comment.