jazzband / django-polymorphic

Improved Django model inheritance with automatic downcasting
https://django-polymorphic.readthedocs.io
Other
1.64k stars 280 forks source link

Fix coverage: use default file locations #565

Closed hugovk closed 8 months ago

hugovk commented 9 months ago

This fixes the coverage upload to Codecov.

Before

Run codecov/codecov-action@v3
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (b9282b8b43eef83f722646d8992c4dd36563046afe0806722184e7e9923a6d7b  codecov)
==> Running version latest
==> Running version v0.7.1
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.4 -s /tmp/coverage
[2023-[12](https://github.com/hugovk/django-polymorphic/actions/runs/7274100648/job/19819330547#step:8:13)-20T10:28:21.532Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.7.1
[[20](https://github.com/hugovk/django-polymorphic/actions/runs/7274100648/job/19819330547#step:8:21)23-12-20T10:28:[21](https://github.com/hugovk/django-polymorphic/actions/runs/7274100648/job/19819330547#step:8:22).539Z] ['info'] => Project root located at: /home/runner/work/django-polymorphic/django-polymorphic
[20[23](https://github.com/hugovk/django-polymorphic/actions/runs/7274100648/job/19819330547#step:8:24)-12-20T10:[28](https://github.com/hugovk/django-polymorphic/actions/runs/7274100648/job/19819330547#step:8:29):21.540Z] ['info'] -> No token specified or token is empty
[2023-12-20T10:28:21.549Z] ['info'] Searching for coverage files...
[2023-12-20T10:28:21.564Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-12-20T10:28:21.564Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-12-20T10:28:21.566Z] ['error'] There was an error running the uploader: No coverage files located, please try use `-f`, or change the project root with `-R`

After

Run codecov/codecov-action@v3

==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (b9282b8b43eef83f722646d8992c4dd36563046afe0806722184e7e9923a6d7b  codecov)
==> Running version latest
==> Running version v0.7.1
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n  -Q github-action-3.1.4 -C b3b2db1b7b455321d1ddf551676851dcf[10](https://github.com/jazzband/django-polymorphic/actions/runs/7274159230/job/19819511208?pr=565#step:7:10)96016
[2023-12-20T[10](https://github.com/jazzband/django-polymorphic/actions/runs/7274159230/job/19819511208?pr=565#step:7:11):34:10.665Z] ['info'] 
     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.7.1
[2023-12-20T10:34:10.673Z] ['info'] => Project root located at: /home/runner/work/django-polymorphic/django-polymorphic
[2023-12-20T10:34:10.674Z] ['info'] -> No token specified or token is empty
[2023-12-20T10:34:10.682Z] ['info'] Searching for coverage files...
[2023-12-20T10:34:10.732Z] ['info'] Warning: Some files located via search were excluded from upload.
[2023-12-20T10:34:10.732Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[2023-12-20T10:34:10.732Z] ['info'] => Found 1 possible coverage files:
  coverage.xml
[2023-12-20T10:34:10.732Z] ['info'] Processing /home/runner/work/django-polymorphic/django-polymorphic/coverage.xml...
[2023-12-20T10:34:10.735Z] ['info'] Detected GitHub Actions as the CI provider.
[2023-12-20T10:34:[11](https://github.com/jazzband/django-polymorphic/actions/runs/7274159230/job/19819511208?pr=565#step:7:12).179Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.4-uploader-0.7.1&token=*******&branch=fix-coverage&build=7274159230&build_url=https%3A%2F%2Fgithub.com%2Fjazzband%2Fdjango-polymorphic%2Factions%2Fruns%2F7274159230&commit=b3b2db1b7b455321d1ddf551676851dcf1096016&job=Test&pr=565&service=github-actions&slug=jazzband%2Fdjango-polymorphic&name=&tag=&flags=&parent=
[2023-[12](https://github.com/jazzband/django-polymorphic/actions/runs/7274159230/job/19819511208?pr=565#step:7:13)-20T10:34:11.929Z] ['info'] https://app.codecov.io/github/jazzband/django-polymorphic/commit/b3b2db1b7b455321d1ddf551676851dcf1096016
https://storage.googleapis.com/codecov/v4/raw/2023-12-20/921C2A12894993B2B3F49AD61A94D632/b3b2db1b7b455321d1ddf551676851dcf1096016/ff1ab271-904d-4f2e-b948-55df75c9237c.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EJOGFN2JQ4OCTGA2MU5AEIT7OT5Z7HTFOAN2SPG4NWSN2UJYOY5U6LZQ%2F20231220%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20231220T103411Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=5d5c9dc403b9e4cd07c625f6b010a8f0b52944060[15](https://github.com/jazzband/django-polymorphic/actions/runs/7274159230/job/19819511208?pr=565#step:7:16)54834536997d84185b902
[2023-12-20T10:34:11.930Z] ['info'] Uploading...
[2023-12-20T10:34:12.102Z] ['info'] {"status":"processing","resultURL":"https://app.codecov.io/github/jazzband/django-polymorphic/commit/b3b2db1b7b455321d1ddf55[16](https://github.com/jazzband/django-polymorphic/actions/runs/7274159230/job/19819511208?pr=565#step:7:17)76851dcf1096016"}

https://app.codecov.io/gh/jazzband/django-polymorphic/pull/565/tree

codecov[bot] commented 9 months ago

Welcome to Codecov :tada:

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered :open_umbrella:

hugovk commented 9 months ago

Ah right, happy to close this if someone would rather debug the combining.

Alternatively, I'd probably factor the Django version into the matrix, so each is ran separately. This would also make good use of the 20 available parallel runners, also make it easier to see if something only failed for a single Django version.

akx commented 9 months ago

Alternatively, I'd probably factor the Django version into the matrix, so each is ran separately.

Yeah, probably a good idea, then just run tox -e ... :)

hugovk commented 9 months ago

Would you like to put together a PR? Feel free to push to this, re-use/copy commits, or start fresh :)

vdboor commented 9 months ago

@akx perhaps this CI file might help with some inspiration? https://github.com/django-parler/django-parler/blob/master/.github/workflows/tests.yaml This doesn't use tox, but let GitHub actions itself do the parallelization instead.

Huge commented 8 months ago

Seems this would be worth merging as it is and then open a new issue for implementing the parallel CI/testing later. WDYT?

j-antunes commented 8 months ago

@Huge - Sounds good. I'll see if I can find some time this week to work on this.