Skip to content

Commit d6f0404

Browse files
author
luongdavid
committed
Merge main
2 parents 5064387 + d7dda9b commit d6f0404

File tree

62 files changed

+2916
-2812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2916
-2812
lines changed

.github/workflows/build.yml

+40-10
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ name: Build
66
on:
77
push:
88
branches: ["main"]
9-
paths:
10-
- "autogen/**"
11-
- "test/**"
12-
- ".github/workflows/build.yml"
13-
- "setup.py"
149
pull_request:
1510
branches: ["main"]
1611
merge_group:
@@ -21,7 +16,39 @@ concurrency:
2116
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2217
permissions: {}
2318
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'
2449
build:
50+
needs: paths-filter
51+
if: needs.paths-filter.outputs.hasChanges == 'true'
2552
runs-on: ${{ matrix.os }}
2653
env:
2754
AUTOGEN_USE_DOCKER: ${{ matrix.os != 'ubuntu-latest' && 'False' }}
@@ -44,9 +71,9 @@ jobs:
4471
- name: Install packages and dependencies
4572
run: |
4673
python -m pip install --upgrade pip wheel
47-
pip install -e .
74+
pip install -e .[cosmosdb]
4875
python -c "import autogen"
49-
pip install pytest mock
76+
pip install pytest-cov>=5 mock
5077
- name: Install optional dependencies for code executors
5178
# code executors and udfs auto skip without deps, so only run for python 3.11
5279
if: matrix.python-version == '3.11'
@@ -67,12 +94,15 @@ jobs:
6794
if: matrix.python-version != '3.10' && matrix.os != 'ubuntu-latest'
6895
run: |
6996
pytest test --ignore=test/agentchat/contrib --skip-openai --skip-docker --durations=10 --durations-min=1.0
70-
- name: Coverage
97+
- name: Coverage with Redis
7198
if: matrix.python-version == '3.10'
7299
run: |
73100
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
76106
- name: Upload coverage to Codecov
77107
if: matrix.python-version == '3.10'
78108
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)