More github-action test with dbs
This commit is contained in:
parent
c7c2969388
commit
73ff92f898
1 changed files with 24 additions and 20 deletions
44
.github/workflows/pythonpackage.yml
vendored
44
.github/workflows/pythonpackage.yml
vendored
|
|
@ -28,8 +28,9 @@ jobs:
|
||||||
if: ${{ matrix.TESTING_DB == 'postgresql' }}
|
if: ${{ matrix.TESTING_DB == 'postgresql' }}
|
||||||
with:
|
with:
|
||||||
postgresql version: '10.7'
|
postgresql version: '10.7'
|
||||||
posgresql db: 'postgres'
|
postgresql db: 'evennia'
|
||||||
postgresql user: 'postgres'
|
postgresql user: 'evennia'
|
||||||
|
postgresql password: 'password'
|
||||||
- name: Shutdown Ubuntu MySQL
|
- name: Shutdown Ubuntu MySQL
|
||||||
if: ${{ matrix.TESTING_DB == 'mysql'}}
|
if: ${{ matrix.TESTING_DB == 'mysql'}}
|
||||||
run: sudo service mysql stop
|
run: sudo service mysql stop
|
||||||
|
|
@ -38,8 +39,11 @@ jobs:
|
||||||
if: ${{ matrix.TESTING_DB == 'mysql'}}
|
if: ${{ matrix.TESTING_DB == 'mysql'}}
|
||||||
with:
|
with:
|
||||||
mysql version: '8.0'
|
mysql version: '8.0'
|
||||||
mysql database: 'root'
|
mysql database: 'evennia'
|
||||||
mysql root password: 'root'
|
character set server: 'utf8mb4'
|
||||||
|
collation server: 'utf8mb4_unicode_ci'
|
||||||
|
mysql_user: 'evennia'
|
||||||
|
mysql_password: 'password'
|
||||||
|
|
||||||
# wait for db to activage, get logs from their start
|
# wait for db to activage, get logs from their start
|
||||||
- name: Wait / sleep
|
- name: Wait / sleep
|
||||||
|
|
@ -48,26 +52,26 @@ jobs:
|
||||||
with:
|
with:
|
||||||
time: '10s'
|
time: '10s'
|
||||||
- name: Database container logs
|
- name: Database container logs
|
||||||
if: failure()
|
# if: failure()
|
||||||
uses: jwalton/gh-docker-logs@v1.0.0
|
uses: jwalton/gh-docker-logs@v1.0.0
|
||||||
- name: Check running containers
|
- name: Check running containers
|
||||||
run: docker ps -a
|
run: docker ps -a
|
||||||
|
|
||||||
- name: Setup PostgreSQL database
|
# - name: Setup PostgreSQL database
|
||||||
if: ${{ matrix.TESTING_DB == 'postgresql' }}
|
# if: ${{ matrix.TESTING_DB == 'postgresql' }}
|
||||||
run: |
|
# run: |
|
||||||
psql --version
|
# psql --version
|
||||||
psql -U postgres -d postgres -h localhost -c "CREATE DATABASE evennia;"
|
# psql -U postgres -d postgres -h localhost -c "CREATE DATABASE evennia;"
|
||||||
psql -U postgres -d postgres -h localhost -c "CREATE USER evennia WITH PASSWORD 'password';"
|
# psql -U postgres -d postgres -h localhost -c "CREATE USER evennia WITH PASSWORD 'password';"
|
||||||
psql -U postgres -d postgres -h localhost -c "ALTER USER evennia CREATEDB;"
|
# psql -U postgres -d postgres -h localhost -c "ALTER USER evennia CREATEDB;"
|
||||||
- name: Setup MySQL database
|
# - name: Setup MySQL database
|
||||||
if: ${{ matrix.TESTING_DB == 'mysql' }}
|
# if: ${{ matrix.TESTING_DB == 'mysql' }}
|
||||||
run: |
|
# run: |
|
||||||
mysql --version
|
# mysql --version
|
||||||
mysql -uroot -proot -e "CREATE DATABASE evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
|
# mysql -uroot -proot -e "CREATE DATABASE evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
|
||||||
mysql -uroot -proot -e "CREATE USER 'evennia'@'localhost' IDENTIFIED BY 'password';"
|
# mysql -uroot -proot -e "CREATE USER 'evennia'@'localhost' IDENTIFIED BY 'password';"
|
||||||
mysql -uroot -proot -e "GRANT ALL ON *.* TO 'evennia'@'localhost' IDENTIFIED BY 'password';"
|
# mysql -uroot -proot -e "GRANT ALL ON *.* TO 'evennia'@'localhost' IDENTIFIED BY 'password';"
|
||||||
|
#
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue