From 0ef9280e73fc9dbaae0c613d508274c3ff9aa05d Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 17 May 2020 00:08:13 +0200 Subject: [PATCH] Further tweaks to githubaction setup --- .github/workflows/pythonpackage.yml | 39 +++++++++++++---------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 76ab002e4c..84d97e8cc8 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -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