Skip to content

Commit

Permalink
Merge branch 'main' into vision_cost
Browse files Browse the repository at this point in the history
  • Loading branch information
BeibinLi authored May 1, 2024
2 parents 4f34f5b + d7dda9b commit 06a0a5d
Show file tree
Hide file tree
Showing 318 changed files with 24,722 additions and 3,820 deletions.
55 changes: 45 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ name: Build
on:
push:
branches: ["main"]
paths:
- "autogen/**"
- "test/**"
- ".github/workflows/build.yml"
- "setup.py"
pull_request:
branches: ["main"]
merge_group:
Expand All @@ -21,7 +16,39 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions: {}
jobs:
paths-filter:
runs-on: ubuntu-latest
outputs:
hasChanges: ${{ steps.filter.outputs.autogen == 'true' || steps.filter.outputs.test == 'true' || steps.filter.outputs.workflows == 'true' || steps.filter.outputs.setup == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
autogen:
- "autogen/**"
test:
- "test/**"
workflows:
- ".github/workflows/build.yml"
setup:
- "setup.py"
- name: autogen has changes
run: echo "autogen has changes"
if: steps.filter.outputs.autogen == 'true'
- name: test has changes
run: echo "test has changes"
if: steps.filter.outputs.test == 'true'
- name: workflows has changes
run: echo "workflows has changes"
if: steps.filter.outputs.workflows == 'true'
- name: setup has changes
run: echo "setup has changes"
if: steps.filter.outputs.setup == 'true'
build:
needs: paths-filter
if: needs.paths-filter.outputs.hasChanges == 'true'
runs-on: ${{ matrix.os }}
env:
AUTOGEN_USE_DOCKER: ${{ matrix.os != 'ubuntu-latest' && 'False' }}
Expand All @@ -30,6 +57,11 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: "3.8"
- os: macos-latest
python-version: "3.9"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -39,9 +71,9 @@ jobs:
- name: Install packages and dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -e .
pip install -e .[cosmosdb]
python -c "import autogen"
pip install pytest mock
pip install pytest-cov>=5 mock
- name: Install optional dependencies for code executors
# code executors and udfs auto skip without deps, so only run for python 3.11
if: matrix.python-version == '3.11'
Expand All @@ -62,12 +94,15 @@ jobs:
if: matrix.python-version != '3.10' && matrix.os != 'ubuntu-latest'
run: |
pytest test --ignore=test/agentchat/contrib --skip-openai --skip-docker --durations=10 --durations-min=1.0
- name: Coverage
- name: Coverage with Redis
if: matrix.python-version == '3.10'
run: |
pip install -e .[test,redis,websockets]
coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
coverage xml
pytest test --ignore=test/agentchat/contrib --skip-openai --durations=10 --durations-min=1.0
- name: Test with Cosmos DB
run: |
pip install -e .[test,cosmosdb]
pytest test/cache/test_cosmos_db_cache.py --skip-openai --durations=10 --durations-min=1.0
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v3
Expand Down
Loading

0 comments on commit 06a0a5d

Please sign in to comment.