Fix typehinting of functions #116
Workflow file for this run
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: GPTJSON Tests | |
on: | |
push | |
jobs: | |
run_tests: | |
name: Run python tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: ["3.11"] | |
pydantic: ["2.1.1"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install poetry | |
run: | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install python dependencies | |
run: | | |
export PATH="/Users/runner/.local/bin:$PATH" | |
poetry install | |
- name: Install pydantic version | |
run: | | |
poetry add pydantic==${{ matrix.pydantic }} | |
- name: Run tests | |
run: | | |
poetry run pytest | |
publish_python_package: | |
name: Publish python package | |
runs-on: ubuntu-latest | |
needs: [run_tests] | |
if: ${{ startsWith(github.ref, 'refs/tags/') && always() && !cancelled() && !contains(needs.*.result, 'failure') }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install poetry | |
run: | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Build sdist static artifact | |
run: | | |
poetry install | |
poetry build | |
- name: Publish | |
run: | | |
poetry publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} |