Skip to content

Commit 57f9ad7

Browse files
authored
Merge branch 'main' into 1607
2 parents 8aa7f6f + d461100 commit 57f9ad7

File tree

720 files changed

+51109
-13535
lines changed

Some content is hidden

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

720 files changed

+51109
-13535
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.png filter=lfs diff=lfs merge=lfs -text
2+
*.jpg filter=lfs diff=lfs merge=lfs -text
3+
*.jpeg filter=lfs diff=lfs merge=lfs -text

.github/workflows/build.yml

+76-12
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/**"
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' }}
@@ -30,6 +57,11 @@ jobs:
3057
matrix:
3158
os: [ubuntu-latest, macos-latest, windows-latest]
3259
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
60+
exclude:
61+
- os: macos-latest
62+
python-version: "3.8"
63+
- os: macos-latest
64+
python-version: "3.9"
3365
steps:
3466
- uses: actions/checkout@v4
3567
- name: Set up Python ${{ matrix.python-version }}
@@ -39,9 +71,9 @@ jobs:
3971
- name: Install packages and dependencies
4072
run: |
4173
python -m pip install --upgrade pip wheel
42-
pip install -e .
74+
pip install -e .[cosmosdb]
4375
python -c "import autogen"
44-
pip install pytest mock
76+
pip install pytest-cov>=5 mock
4577
- name: Install optional dependencies for code executors
4678
# code executors and udfs auto skip without deps, so only run for python 3.11
4779
if: matrix.python-version == '3.11'
@@ -57,20 +89,52 @@ jobs:
5789
- name: Test with pytest skipping openai tests
5890
if: matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest'
5991
run: |
60-
pytest test --skip-openai --durations=10 --durations-min=1.0
92+
pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
6193
- name: Test with pytest skipping openai and docker tests
6294
if: matrix.python-version != '3.10' && matrix.os != 'ubuntu-latest'
6395
run: |
64-
pytest test --skip-openai --skip-docker --durations=10 --durations-min=1.0
65-
- name: Coverage
96+
pytest test --ignore=test/agentchat/contrib --skip-openai --skip-docker --durations=10 --durations-min=1.0
97+
- name: Coverage with Redis
6698
if: matrix.python-version == '3.10'
6799
run: |
68100
pip install -e .[test,redis,websockets]
69-
coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
70-
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
71106
- name: Upload coverage to Codecov
72107
if: matrix.python-version == '3.10'
73108
uses: codecov/codecov-action@v3
74109
with:
75110
file: ./coverage.xml
76111
flags: unittests
112+
build-check:
113+
if: always()
114+
runs-on: ubuntu-latest
115+
needs: [build]
116+
steps:
117+
- name: Get Date
118+
shell: bash
119+
run: |
120+
echo "date=$(date +'%m/%d/%Y %H:%M:%S')" >> "$GITHUB_ENV"
121+
122+
- name: Run Type is ${{ github.event_name }}
123+
if: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'}}
124+
shell: bash
125+
run: |
126+
echo "run_type=${{ github.event_name }}" >> "$GITHUB_ENV"
127+
128+
- name: Fail workflow if build failed
129+
id: check_build_failed
130+
if: contains(join(needs.*.result, ','), 'failure')
131+
uses: actions/github-script@v6
132+
with:
133+
script: core.setFailed('Build Failed!')
134+
135+
- name: Fail workflow if build cancelled
136+
id: check_build_cancelled
137+
if: contains(join(needs.*.result, ','), 'cancelled')
138+
uses: actions/github-script@v6
139+
with:
140+
script: core.setFailed('Build Cancelled!')

0 commit comments

Comments
 (0)