Httpx and Pydantic V2 fixes #2
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: | |
| branches: | |
| - master | |
| tags: | |
| - "*" | |
| paths: | |
| - "**.py" | |
| - "!rpcpy/__version__.py" | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - "**.py" | |
| - "!rpcpy/__version__.py" | |
| jobs: | |
| Tests: | |
| name: "Python ${{ matrix.python-version }} ${{ matrix.os }}" | |
| runs-on: "${{ matrix.os }}" | |
| strategy: | |
| matrix: | |
| python-version: [3.9, 3.10, 3.11, 3.12] | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| env: | |
| OS: ${{ matrix.os }} | |
| PYTHON: ${{ matrix.python-version }} | |
| 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 poetry | |
| poetry config virtualenvs.create false --local | |
| poetry install -E full | |
| - name: Static type and format checking | |
| run: | | |
| python script/check.py | |
| - name: Generate coverage report | |
| run: | | |
| pytest --cov=./ --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| files: ./coverage.xml | |
| directory: ./coverage/reports/ | |
| flags: unittests | |
| env_vars: OS,PYTHON | |
| fail_ci_if_error: true | |
| path_to_write_report: ./coverage/codecov_report.txt | |
| verbose: true | |
| - name: Uninstall pydantic | |
| run: | | |
| pip uninstall -y pydantic | |
| - name: Generate coverage report | |
| run: | | |
| pytest --cov=./ --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| files: ./coverage.xml | |
| directory: ./coverage/reports/ | |
| flags: unittests | |
| env_vars: OS,PYTHON | |
| fail_ci_if_error: true | |
| path_to_write_report: ./coverage/codecov_report.txt | |
| verbose: true | |
| Publish: | |
| needs: Tests | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: "${{ matrix.os }}" | |
| environment: release | |
| permissions: | |
| id-token: write | |
| strategy: | |
| matrix: | |
| python-version: [3.7] | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip poetry | |
| - name: Build | |
| run: | | |
| poetry build | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |