Skip to content

Commit 619d159

Browse files
Backport PR #519: Run Python unit tests as a part of CI (#523)
Co-authored-by: Andrii Ieroshenko <aieroshe@amazon.com>
1 parent 264a67d commit 619d159

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/unit-tests.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Python Unit Tests
2+
3+
# suppress warning raised by https://github.com/jupyter/jupyter_core/pull/292
4+
env:
5+
JUPYTER_PLATFORM_DIRS: "1"
6+
7+
on:
8+
push:
9+
branches: main
10+
pull_request:
11+
branches: "*"
12+
13+
jobs:
14+
unit-tests:
15+
name: Linux
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Base Setup
22+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
24+
- name: Install extension dependencies and build the extension
25+
run: ./scripts/install.sh
26+
27+
- name: Execute unit tests
28+
run: |
29+
set -eux
30+
pytest -vv -r ap --cov jupyter_ai

packages/jupyter-ai/jupyter_ai/tests/test_config_manager.py

+2
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ def test_update_after_describe(cm: ConfigManager):
269269
assert new_config.model_provider_id == "cohere:medium"
270270

271271

272+
# TODO: make the test work on Linux including CI.
273+
@pytest.mark.skip(reason="Flakey on Linux including CI.")
272274
def test_forbid_write_write_conflict(cm: ConfigManager):
273275
configure_to_openai(cm)
274276
# call DescribeConfig

0 commit comments

Comments
 (0)