Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Python unit tests as a part of CI #519

Merged
merged 4 commits into from
Dec 18, 2023

Conversation

andrii-i
Copy link
Collaborator

@andrii-i andrii-i commented Dec 16, 2023

Problem

Unit tests are not ran as a part of CI.

Solution

This PR adds a "Unit Tests / Linux" CI step. Fixes #370.

forbid_write_write_conflict test fails in CI and is flakey on linux so this PR marks the test to be skipped, adds a TODO comment to make the test work.

image

@andrii-i andrii-i added enhancement New feature or request maintenance Change related to maintenance of the repository testing Quality assurance tests labels Dec 16, 2023
@andrii-i
Copy link
Collaborator Author

andrii-i commented Dec 16, 2023

forbid_write_write_conflict test fails in CI, passes locally

FAILED packages/jupyter-ai/jupyter_ai/tests/test_config_manager.py::test_forbid_write_write_conflict - Failed: DID NOT RAISE <class 'jupyter_ai.config_manager.WriteConflictError'>

@krassowski
Copy link
Member

krassowski commented Dec 17, 2023

It fails locally for me on Ubuntu as well when running all tests, but passes when running this test alone.

Edit: To be more precise, it randomly passes or fails when run in isolation.

@andrii-i
Copy link
Collaborator Author

andrii-i commented Dec 18, 2023

Thank you @krassowski. Marked the test to be skipped, added TODO comment to make the test work.

@andrii-i andrii-i marked this pull request as ready for review December 18, 2023 17:44
Copy link
Member

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Just one minor comment below.

.github/workflows/unit-tests.yml Outdated Show resolved Hide resolved
@andrii-i andrii-i requested a review from dlqqq December 18, 2023 18:40
@andrii-i
Copy link
Collaborator Author

Thanks @dlqqq and @krassowski for looking into this.

@andrii-i andrii-i merged commit aca80b7 into jupyterlab:main Dec 18, 2023
7 checks passed
@andrii-i andrii-i deleted the run-unit-tests branch December 18, 2023 19:00
@andrii-i andrii-i changed the title Run unit tests as a part of CI Run Python unit tests as a part of CI Dec 18, 2023
@andrii-i
Copy link
Collaborator Author

@meeseeksdev please backport to 1.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyter-ai that referenced this pull request Dec 18, 2023
andrii-i added a commit that referenced this pull request Dec 18, 2023
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* Add ci step to run unit tests

* Skip test_forbid_write_write_conflict as flakey

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Comments per @dlqqq

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
* Add ci step to run unit tests

* Skip test_forbid_write_write_conflict as flakey

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Comments per @dlqqq

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintenance Change related to maintenance of the repository testing Quality assurance tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add server unit tests to CI
3 participants