Skip to content

Commit

Permalink
Switch to Coveralls Github action (#249)
Browse files Browse the repository at this point in the history
* Switch to Coveralls Github action

---------

Co-authored-by: Iacopo Spalletti <i.spalletti@nephila.it>
  • Loading branch information
protoroto and yakky authored Nov 27, 2023
1 parent 194b203 commit 7faddf7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion app_helper/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion app_helper/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
1 change: 1 addition & 0 deletions changes/248.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch to Coveralls Github action
4 changes: 4 additions & 0 deletions tests/test_utils/helper_no_cms.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ def setup():
from app_helper import runner

runner.setup("example1", sys.modules[__name__], use_cms=False)


if __name__ == "__main__":
run()

0 comments on commit 7faddf7

Please sign in to comment.