@@ -6,11 +6,6 @@ name: Build
6
6
on :
7
7
push :
8
8
branches : ["main"]
9
- paths :
10
- - " autogen/**"
11
- - " test/**"
12
- - " .github/workflows/build.yml"
13
- - " setup.py"
14
9
pull_request :
15
10
branches : ["main"]
16
11
merge_group :
@@ -21,7 +16,39 @@ concurrency:
21
16
cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
22
17
permissions : {}
23
18
jobs :
19
+ paths-filter :
20
+ runs-on : ubuntu-latest
21
+ outputs :
22
+ hasChanges : ${{ steps.filter.outputs.autogen == 'true' || steps.filter.outputs.test == 'true' || steps.filter.outputs.workflows == 'true' || steps.filter.outputs.setup == 'true' }}
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+ - uses : dorny/paths-filter@v2
26
+ id : filter
27
+ with :
28
+ filters : |
29
+ autogen:
30
+ - "autogen/**"
31
+ test:
32
+ - "test/**"
33
+ workflows:
34
+ - ".github/workflows/build.yml"
35
+ setup:
36
+ - "setup.py"
37
+ - name : autogen has changes
38
+ run : echo "autogen has changes"
39
+ if : steps.filter.outputs.autogen == 'true'
40
+ - name : test has changes
41
+ run : echo "test has changes"
42
+ if : steps.filter.outputs.test == 'true'
43
+ - name : workflows has changes
44
+ run : echo "workflows has changes"
45
+ if : steps.filter.outputs.workflows == 'true'
46
+ - name : setup has changes
47
+ run : echo "setup has changes"
48
+ if : steps.filter.outputs.setup == 'true'
24
49
build :
50
+ needs : paths-filter
51
+ if : needs.paths-filter.outputs.hasChanges == 'true'
25
52
runs-on : ${{ matrix.os }}
26
53
env :
27
54
AUTOGEN_USE_DOCKER : ${{ matrix.os != 'ubuntu-latest' && 'False' }}
44
71
- name : Install packages and dependencies
45
72
run : |
46
73
python -m pip install --upgrade pip wheel
47
- pip install -e .
74
+ pip install -e .[cosmosdb]
48
75
python -c "import autogen"
49
- pip install pytest mock
76
+ pip install pytest-cov>=5 mock
50
77
- name : Install optional dependencies for code executors
51
78
# code executors and udfs auto skip without deps, so only run for python 3.11
52
79
if : matrix.python-version == '3.11'
@@ -67,12 +94,15 @@ jobs:
67
94
if : matrix.python-version != '3.10' && matrix.os != 'ubuntu-latest'
68
95
run : |
69
96
pytest test --ignore=test/agentchat/contrib --skip-openai --skip-docker --durations=10 --durations-min=1.0
70
- - name : Coverage
97
+ - name : Coverage with Redis
71
98
if : matrix.python-version == '3.10'
72
99
run : |
73
100
pip install -e .[test,redis,websockets]
74
- coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
75
- coverage xml
101
+ pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
102
+ - name : Test with Cosmos DB
103
+ run : |
104
+ pip install -e .[test,cosmosdb]
105
+ pytest test/cache/test_cosmos_db_cache.py --skip-openai --durations=10 --durations-min=1.0
76
106
- name : Upload coverage to Codecov
77
107
if : matrix.python-version == '3.10'
78
108
uses : codecov/codecov-action@v3
0 commit comments