File tree Expand file tree Collapse file tree 5 files changed +8
-52
lines changed Expand file tree Collapse file tree 5 files changed +8
-52
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,13 @@ name: Publish Python Package
2
2
3
3
on :
4
4
push :
5
- branches : [ main, test, develop ]
5
+ branches : [ main, develop ]
6
6
pull_request :
7
7
types :
8
8
- opened
9
9
10
10
env :
11
11
PACKAGE_NAME : crawlab-sdk
12
- PYPI_REPOSITORY_URL : https://test.pypi.org/legacy/
13
- PYPI_TEST_REPOSITORY_URL : https://test.pypi.org/legacy/
14
12
15
13
jobs :
16
14
build :
38
36
poetry build
39
37
echo "version=$(poetry version -s)" >> $GITHUB_OUTPUT
40
38
39
+ - name : Run tests
40
+ run : |
41
+ python -m pytest tests/
42
+
41
43
- name : Upload artifact
42
44
uses : actions/upload-artifact@v4
43
45
with :
73
75
id-token : write
74
76
if : needs.check_version.outputs.is_new_version == 'true'
75
77
steps :
76
- - name : Configure repository URL
77
- id : configure
78
- run : |
79
- if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
80
- echo "repository_url=${{ env.PYPI_REPOSITORY_URL }}" >> $GITHUB_OUTPUT
81
- else
82
- echo "repository_url=${{ env.PYPI_TEST_REPOSITORY_URL }}" >> $GITHUB_OUTPUT
83
- fi
84
-
85
78
- name : Download artifact
86
79
uses : actions/download-artifact@v4
87
80
with :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ def save_items(items: Iterable[dict]):
13
13
type = "data" ,
14
14
payload = items ,
15
15
)
16
- sys .stdout .writelines ([ msg .model_dump_json ()] )
16
+ sys .stdout .write ( msg .model_dump_json () + " \n " )
17
17
sys .stdout .flush ()
Original file line number Diff line number Diff line change 5
5
6
6
class IPCMessage (BaseModel ):
7
7
type : Optional [Literal ["data" , "log" ]] = Field (description = "Message type" )
8
- ipc : bool = Field (description = "The message is IPC" , default = True )
9
8
payload : Iterable [dict ] | dict = Field (description = "Message payload" )
9
+ ipc : bool = Field (description = "The message is IPC" , default = True )
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " crawlab-sdk"
3
- version = " 0.7.0rc4 "
3
+ version = " 0.7.0rc5 "
4
4
description = " Python SDK for Crawlab"
5
5
authors = [" Marvin Zhang <tikazyq@163.com>" ]
6
6
readme = " README.md"
You can’t perform that action at this time.
0 commit comments