plone / guillotina

Python AsyncIO data API to manage billions of resources
https://guillotina.readthedocs.io/en/latest/
Other
187 stars 51 forks source link

Use github actions instead of travis #935

Closed lferran closed 4 years ago

lferran commented 4 years ago

Fixes https://github.com/plone/guillotina/issues/907

codecov-io commented 4 years ago

Codecov Report

Merging #935 into master will increase coverage by 0.2%. The diff coverage is 89.3%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #935     +/-   ##
========================================
+ Coverage    94.5%   94.6%   +0.2%     
========================================
  Files         333     315     -18     
  Lines       29793   27876   -1917     
========================================
- Hits        28135   26361   -1774     
+ Misses       1658    1515    -143     
Impacted Files Coverage Δ
guillotina/tests/dbusers/test_api.py 100.0% <ø> (ø)
guillotina/contrib/dbusers/services/groups.py 92.5% <66.7%> (-3.1%) :arrow_down:
guillotina/tests/test_api.py 99.6% <100.0%> (+0.1%) :arrow_up:
guillotina/tests/test_swagger.py 100.0% <100.0%> (ø)
guillotina/db/storages/pg.py 89.0% <0.0%> (-0.1%) :arrow_down:
guillotina/response.py
guillotina/event.py
guillotina/subscribers.py
guillotina/registry.py
guillotina/tests/__init__.py
... and 13 more
lferran commented 4 years ago

@bloodbare @vangheem @masipcat finally made it! ready to review and merge. orders of magnitude quicker than travis :tada:

bloodbare commented 4 years ago

@lferran some tests are failing ? Maybe we only need covertura on one case ?

lferran commented 4 years ago

weird. seems like there is a pytest internal error when running py3.8, postgres with custom db schema:

  INTERNALERROR>     _remove_cached_results_from_failed_fixtures(item)
  INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/pytest_rerunfailures.py", line 135, in _remove_cached_results_from_failed_fixtures
  INTERNALERROR>     result, cache_key, err = getattr(fixture_def, cached_result)
  INTERNALERROR> TypeError: cannot unpack non-iterable NoneType object

  ======= 1030 passed, 7 skipped, 9 warnings, 1 rerun in 217.75s (0:03:37) =======
  ##[error]Process completed with exit code 3.

https://docs.pytest.org/en/latest/usage.html#possible-exit-codes

lferran commented 4 years ago

@bloodbare @vangheem @masipcat this is ready now.

I added

if: matrix.database == 'postgres' && matrix.db_schema == 'public'

to upload covertura only once... but then the coverage decreases almost 1%, so I removed it.

Let me know if you prefer that I add it back despite the coverage loss.

p.s: sorry it took so long guys

EDIT: some tests are still flaky :/ will investigate further

lferran commented 4 years ago

now yes! seems like pytest-rerunfailures version that we had did not support python 3.8, so when there were occasional failures, the rerun would end up in pytest internal error