mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
* extract code from text * solve_problem; request_timeout in config * improve * move import statement * improve code * generate assertions * constant * configs for implement; voting * doc * execute code in docker * success indicator of code executation in docker * success indicator * execute code * strip n * add cost in generate_code * add docstr * filename * bytes * check docker version * print log * python test * remove api key address * rename exit code * success exit code * datasets * exit code * recover openai tests * cache and pattern match * wait * wait * cache and test * timeout test * python image name and skip macos * windows image * docker images * volume path and yaml * win path -> posix * extensions * path * path * path * path * path * path * path * path * path * path * path * skip windows * path * timeout in windows * use_docker * use_docker * hot fix from #1000 --------- Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
|
|
name: OpenAI
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ['main']
|
|
paths:
|
|
- 'flaml/integrations/oai/**'
|
|
- 'test/openai/**'
|
|
- 'notebook/integrate_openai.ipynb'
|
|
- 'notebook/integrate_chatgpt_math.ipynb'
|
|
- '.github/workflows/openai.yml'
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
python-version: [3.9]
|
|
runs-on: ${{ matrix.os }}
|
|
environment: openai
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install packages and dependencies
|
|
run: |
|
|
docker --version
|
|
python -m pip install --upgrade pip wheel
|
|
pip install -e .[autogen,blendsearch]
|
|
python -c "import flaml"
|
|
- name: Coverage
|
|
env:
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
run: |
|
|
pip install coverage pytest datasets nbconvert nbformat ipykernel
|
|
coverage run -a -m pytest test/openai
|
|
coverage xml
|
|
cat "$(pwd)/test/openai/executed_openai_notebook_output.txt"
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
file: ./coverage.xml
|
|
flags: unittests
|