You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- # 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
|