Style updates and improved matrix include

This commit is contained in:
dvoraen 2022-12-01 05:10:59 -08:00
parent a5fc4dad35
commit 37ac4d55a4
2 changed files with 20 additions and 19 deletions

View file

@ -22,10 +22,9 @@ jobs:
python-version: ["3.9", "3.10", "3.11"]
TESTING_DB: ["sqlite3", "postgresql", "mysql"]
include:
- coverage-test: false
- coverage-test: true
python-version: "3.10"
- python-version: "3.10"
TESTING_DB: "sqlite3"
coverage-test: true
steps:
- uses: actions/checkout@v3
@ -66,7 +65,7 @@ jobs:
# OBS - it's important to not run the coverage tests with --parallel, it messes up the coverage
# calculation!
- name: Run test suite with coverage
if: matrix.coverage-test
if: ${{ matrix.coverage-test }}
working-directory: testing_mygame
run: |
coverage run \
@ -82,7 +81,7 @@ jobs:
# For other runs, run tests in parallel
- name: Run test suite
if: ! matrix.coverage-test
if: ! ${{ matrix.coverage-test }}
working-directory: testing_mygame
run: |
evennia test \
@ -92,11 +91,11 @@ jobs:
--timing \
evennia
# we only want to run coverall once, so we only do it for one of the matrix combinations
# we only want to run coverall once, so we only do it for the designated matrix combination(s)
# it's also not critical if pushing to either service fails (happens for PRs since env is not
# available outside of the evennia org)
- name: Send data to Coveralls
if: matrix.coverage-test && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop')
if: ${{ matrix.coverage-test && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop') }}
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
@ -109,6 +108,8 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
@ -116,14 +117,14 @@ jobs:
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push for master
if: github.ref == 'refs/heads/master'
if: ${{ github.ref == 'refs/heads/master' }}
id: docker_build_master
uses: docker/build-push-action@v3
with:
@ -131,7 +132,7 @@ jobs:
tags: evennia/evennia:latest
- name: Build and push for develop
if: github.ref == 'refs/heads/develop'
if: ${{ github.ref == 'refs/heads/develop' }}
id: docker_build_develop
uses: docker/build-push-action@v3
with: