diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e8c3a9d..7d10d1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,7 @@ jobs: continue-on-error: ${{ matrix.continue-on-error }} strategy: matrix: - python-version: [3.11, 3.10.x, 3.9] + python-version: ["3.11", "3.10", "3.9"] django: [42, 32] cms: [nocms, cms311, async] continue-on-error: [false] @@ -46,10 +46,26 @@ jobs: run: | tox -e$TOX_ENV .tox/$TOX_ENV/bin/coverage xml - .tox/$TOX_ENV/bin/coveralls + - name: Coveralls Parallel + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + debug: true + files: ./coverage.xml + flag-name: run-${{ format('py{0}-django{1}-{2}', matrix.python-version, matrix.django, matrix.cms) }} - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} flags: unittests files: ./coverage.xml fail_ci_if_error: false + finish: + needs: test + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + parallel-finished: true diff --git a/app_helper/asgi.py b/app_helper/asgi.py index e155bf2..3ce8ab6 100644 --- a/app_helper/asgi.py +++ b/app_helper/asgi.py @@ -4,4 +4,4 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "helper") # pragma: no cover -application = get_asgi_application() # pragma: no cover +application = get_asgi_application() diff --git a/app_helper/server.py b/app_helper/server.py index 590a6c9..f831a0b 100644 --- a/app_helper/server.py +++ b/app_helper/server.py @@ -16,7 +16,7 @@ def _run_daphne(settings, bind, port, migrate_cmd, verbose): from daphne.cli import CommandLineInterface _setup_db(migrate_cmd) - daphne_args = ["-b", bind, "-p", port, "-v", verbose, settings.ASGI_APPLICATION] + daphne_args = ["-b", bind, "-p", port, "-v", verbose or "1", settings.ASGI_APPLICATION] autoreload.run_with_reloader(CommandLineInterface().run, daphne_args) diff --git a/changes/248.feature b/changes/248.feature new file mode 100644 index 0000000..ac23805 --- /dev/null +++ b/changes/248.feature @@ -0,0 +1 @@ +Switch to Coveralls Github action diff --git a/tests/test_utils/helper_no_cms.py b/tests/test_utils/helper_no_cms.py index df170ef..04b7637 100644 --- a/tests/test_utils/helper_no_cms.py +++ b/tests/test_utils/helper_no_cms.py @@ -29,3 +29,7 @@ def setup(): from app_helper import runner runner.setup("example1", sys.modules[__name__], use_cms=False) + + +if __name__ == "__main__": + run()