Merge pull request #9 from cubenlp/rex/curl #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Package | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- python-version: "3.9" | |
os: ubuntu-latest | |
- python-version: "3.9" | |
os: macos-latest | |
# - python-version: "3.9" | |
# os: window | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install .[test] | |
python -m pip install -r requirements_dev.txt | |
- name: Test with pytest and coverage | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
OPENAI_API_BASE_URL: ${{ secrets.OPENAI_API_BASE_URL }} | |
run: | | |
pip install coverage | |
coverage run -m pytest tests/ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false |