Skip tests that depend on OpenAI via --skip-openai (#1097)

* --skip-openai

* All tests pass

* Update build.yml

* Update Contribute.md

* Fix for failing Ubuntu tests

* More tests skipped, fixing 3.10 build

* Apply suggestions from code review

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>

* Added more comments

* fixed test__wrap_function_*

---------

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Davor Runje <davor@airt.ai>
This commit is contained in:
Maxim Saplin
2023-12-31 22:37:21 +03:00
committed by GitHub
parent 3b0e059699
commit c80df8acab
19 changed files with 139 additions and 107 deletions

View File

@@ -41,17 +41,15 @@ jobs:
pip install -e .
python -c "import autogen"
pip install -e. pytest mock
pip uninstall -y openai
- name: Test with pytest
if: matrix.python-version != '3.10'
run: |
pytest test
pytest test --skip-openai
- name: Coverage
if: matrix.python-version == '3.10'
run: |
pip install -e .[test]
pip uninstall -y openai
coverage run -a -m pytest test --ignore=test/agentchat/contrib
coverage run -a -m pytest test --ignore=test/agentchat/contrib --skip-openai
coverage xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'