Refactoring of actions

This commit is contained in:
Griatch 2020-05-18 00:12:18 +02:00
parent 856dcb3278
commit 357e60dc81

View file

@ -31,17 +31,14 @@ jobs:
postgresql db: 'evennia' postgresql db: 'evennia'
postgresql user: 'evennia' postgresql user: 'evennia'
postgresql password: 'password' postgresql password: 'password'
- name: Shutdown Ubuntu MySQL
if: ${{ matrix.TESTING_DB == 'mysql'}}
run: sudo service mysql stop
- name: Set up MySQL server - name: Set up MySQL server
uses: mirromutth/mysql-action@v1.1 uses: mirromutth/mysql-action@v1.1
if: ${{ matrix.TESTING_DB == 'mysql'}} if: ${{ matrix.TESTING_DB == 'mysql'}}
with: with:
mysql version: '8.0' mysql version: '5.7'
mysql database: 'evennia'
character set server: 'utf8mb4' character set server: 'utf8mb4'
collation server: 'utf8mb4_unicode_ci' collation server: 'utf8mb4_unicode_ci'
mysql database: 'evennia'
mysql user: 'evennia' mysql user: 'evennia'
mysql password: 'password' mysql password: 'password'
@ -52,26 +49,10 @@ jobs:
with: with:
time: '10s' time: '10s'
- name: Database container logs - name: Database container logs
# 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
# if: ${{ matrix.TESTING_DB == 'postgresql' }}
# run: |
# psql --version
# 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 "ALTER USER evennia CREATEDB;"
# - name: Setup MySQL database
# if: ${{ matrix.TESTING_DB == 'mysql' }}
# run: |
# mysql --version
# 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 "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:
@ -99,7 +80,7 @@ jobs:
evennia migrate evennia migrate
evennia collectstatic --noinput evennia collectstatic --noinput
- name: Run test - name: Run test suite
run: | run: |
cd testing_mygame cd testing_mygame
coverage run --source=../evennia --omit=*/migrations/*,*/urls.py,*/test*.py,*.sh,*.txt,*.md,*.pyc,*.service ../bin/unix/evennia test --settings=settings --keepdb evennia coverage run --source=../evennia --omit=*/migrations/*,*/urls.py,*/test*.py,*.sh,*.txt,*.md,*.pyc,*.service ../bin/unix/evennia test --settings=settings --keepdb evennia