zerasul/blask

Github CI dosen't work

zerasul opened this issue · 4 comments

Check Github Action Script due to errors with code coverage step

Hello @zerasul
I can try to work on it, if you want ?

It is seems to be the python-dotenv module which is missing.

___________________ ERROR collecting tests/settings_test.py ____________________
ImportError while importing test module '/home/runner/work/blask/blask/tests/settings_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/settings_test.py:6: in <module>
    from dotenv import load_dotenv
E   ModuleNotFoundError: No module named 'dotenv'
  • I can add it on Pipfile or just install it during the ci, but i think if we want to run test manually it's better to have it on Pipfile.

  • I have a suggestion for the ci, i think it's more relevant if the CI run when a pull request is submitted instead of when commits are pushed on branches.

What do you think @zerasul about this points ?

When the module missing issue is fixed, tests run but a lot of failed

=========================== short test summary info ============================
FAILED tests/blogrender_test.py::TestblogRender::test_generatetag - assert "h...
FAILED tests/blogrender_test.py::TestblogRender::test_search - TypeError: '<'...
FAILED tests/blogrender_test.py::TestblogRender::test_list_directories - asse...
FAILED tests/blogrender_test.py::TestblogRender::test_generate_sitemap_xml - ...
FAILED tests/main_test.py::TestMain::test_search - TypeError: '<' not support...
FAILED tests/main_test.py::TestMain::test_tag_search - assert b"href='/about'...
FAILED tests/main_test.py::TestMain::test_category_search - assert b"href='/a...
FAILED tests/main_test.py::TestMain::test_author_search - assert b"href='/abo...
FAILED tests/main_test.py::TestMain::test_get_sitemap - ValueError: list.remo...
FAILED tests/settings_test.py::TestBlaskSettings::test_from_dotenv - Assertio...
======================== 10 failed, 18 passed in 3.46s =========================

Hi; it seems there is some error yes... let me check.

About your suggestion, yes i think is better to include CI only for Pull Requests.

Fixed