File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
libs/langgraph-checkpoint-mongodb Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 11
11
inputs :
12
12
working-directory :
13
13
required : true
14
- type : string
15
- default : ' libs/mongodb'
14
+ options :
15
+ - libs/mongodb
16
+ - langgraph-checkpoint-mongodb
17
+ default : libs/mongodb
16
18
17
19
env :
18
20
PYTHON_VERSION : " 3.11"
@@ -131,9 +133,10 @@ jobs:
131
133
"$PKG_NAME==$VERSION" \
132
134
)
133
135
134
- # Replace all dashes in the package name with underscores,
135
- # since that's how Python imports packages with dashes in the name.
136
- IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
136
+ # For langchain-mongodb, replace dashes in the package name with underscores.
137
+ IMPORT_NAME="${PKG_NAME//-/_}"
138
+ # If "langgraph-checkpoint-mongodb", it's a namespace package => /-/.
139
+ [[ "$PKG_NAME" == "langgraph-checkpoint-mongodb" ]] && IMPORT_NAME="${PKG_NAME//-/.}"
137
140
138
141
poetry run python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
139
142
Original file line number Diff line number Diff line change 4
4
# TESTING AND COVERAGE
5
5
# #####################
6
6
7
- test tests :
8
- poetry run pytest tests
7
+ # Define a variable for the test file path.
8
+ TEST_FILE ?= tests/unit_tests/
9
+ integration_test integration_tests : TEST_FILE=tests/integration_tests/
10
+
11
+
12
+ test tests integration_test integration_tests :
13
+ poetry run pytest $(TEST_FILE )
9
14
10
15
# #####################
11
16
# LINTING AND FORMATTING
40
45
@echo ' format - run code formatters'
41
46
@echo ' lint - run linters'
42
47
@echo ' test - run unit tests'
48
+ @echo ' integration_test - run integration tests'
49
+ @echo ' test TEST_FILE=<test_file> - run all tests in file'
You can’t perform that action at this time.
0 commit comments