Further tweaks to githubaction setup

This commit is contained in:
Griatch 2020-05-17 00:08:13 +02:00 committed by GitHub
parent 10dae4cefa
commit 9c85ba2ffb

View file

@ -23,7 +23,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Set up postgreSQL database
if: ${{ matrix.TESTING_DB }} == 'postgresql'
if: ${{ matrix.TESTING_DB == 'postgresql' }}
uses: harmon758/postgresql-action@v1
with:
postgresql version: '11'
run: |
psql --version
sudo service postgresql start
@ -31,7 +34,10 @@ jobs:
psql -U postgres -c "CREATE USER evennia WITH PASSWORD 'password';"
psql -U postgres -c "ALTER USER evennia CREATEDB;"
- name: Set up MySQL database
if: ${{ matrix.TESTING_DB }} == 'mysql'
if: ${{ matrix.TESTING_DB == 'mysql' }}
uses: mirromutth/mysql-action@v1.1
with:
mysql version: '8.0'
run: |
mysql --version
sudo service mysql start
@ -42,7 +48,9 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install psycopg2-binary
pip install mysqlclient
pip install mysqlclient
pip install coveralls
pip install codacy-coverage
pip install -e .
pip install -r requirements_extra.txt
- name: Set up evennia
@ -55,22 +63,9 @@ jobs:
- name: run test
run: |
coverage run --source=../evennia --omit=*/migrations/*,*/urls.py,*/test*.py,*.sh,*.txt,*.md,*.pyc,*.service ../bin/unix/evennia test --settings=settings --keepdb evennia
coveralls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: install coveralls
run: |
python -m pip install --upgrade pip
pip install coveralls
pip install codacy-coverage
- name: run and upload to coveralls
run: |
coveralls
coverage xml
python-codacy-coverage -r coverage.xml
- name: run coverall
if: ${{ matrix.TESTING_DB == 'sqlite3' && matix.python-version == 3.7 }}
run: |
coveralls
coverage xml
python-codacy-coverage -r coverage.xml