fix(deps): Make library compatible with Pydantic V2 #991
Workflow file for this run
This file contains hidden or 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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| name: Unit tests | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: install python dependencies | |
| run: | | |
| bash scripts/install-poetry.sh | |
| poetry install | |
| - name: run tests | |
| run: poetry run pytest --cov=queenbee tests/ | |
| - name: run test coverage | |
| run: | | |
| echo "Coveralls is no longer supported" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| deploy: | |
| name: Deploy to GitHub and PyPI | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.ref == 'refs/heads/master' && github.repository_owner == 'pollination' | |
| steps: | |
| - name: Checkout Current Branch | |
| uses: actions/checkout@v3 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.8.1 | |
| - name: install python dependencies | |
| run: | | |
| bash scripts/install-poetry.sh | |
| poetry install --extras cli | |
| - name: install semantic-release | |
| run: npm install @semantic-release/exec | |
| - name: generate queenbee schemas | |
| run: poetry run python3 scripts/gen_schemas.py | |
| - name: run semantic release | |
| id: semantic | |
| uses: cycjimmy/semantic-release-action@v4 | |
| with: | |
| semantic_version: 23.1.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GIT_AUTHOR_NAME: ladybugbot | |
| GIT_AUTHOR_EMAIL: ${{ secrets.POLLINATION_LADYBUGBOT_EMAIL }} | |
| GIT_COMMITTER_NAME: ladybugbot | |
| GIT_COMMITTER_EMAIL: ${{ secrets.POLLINATION_LADYBUGBOT_EMAIL }} | |
| PYPI_PASSWORD: ${{ secrets.POLLINATION_PYPI_PASSWORD }} | |
| PYPI_USERNAME: ${{ secrets.POLLINATION_PYPI_USERNAME }} | |
| outputs: | |
| tag: ${{ steps.semantic.outputs.new_release_version }} | |
| docs: | |
| name: Generate docs | |
| runs-on: ubuntu-latest | |
| needs: deploy | |
| if: ${{ github.ref == 'refs/heads/master' && github.repository_owner == 'pollination' && contains(needs.deploy.outputs.tag, '.') }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.12 | |
| - name: install dependencies | |
| run: | | |
| bash scripts/install-poetry.sh | |
| poetry install --extras cli | |
| - name: build docs | |
| run: | | |
| poetry run python3 scripts/gen_schemas.py --version ${{needs.deploy.outputs.tag}} | |
| poetry run sphinx-apidoc -f -e -d 4 -o ./docs/modules ./queenbee | |
| poetry run sphinx-build -b html ./docs ./docs/_build | |
| - name: deploy to github pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| # this will use ladybugbot token | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: docs/_build/ | |
| force_orphan: true | |
| keep_files: false | |
| full_commit_message: "deploy: update docs" |