Bump mypy from 1.16.1 to 1.17.0 #218
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: | |
| merge_group: | |
| push: | |
| branches: [master] | |
| tags: [v*] | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: Run linters | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| cache: pip | |
| cache-dependency-path: '**/requirements*.txt' | |
| - name: Install dependencies | |
| uses: py-actions/py-dependency-install@v4 | |
| with: | |
| path: requirements-dev.txt | |
| - name: Run mypy | |
| run: mypy | |
| - name: Install check-wheel-content, pre-commit, and twine | |
| run: python -m pip install build pre-commit check-wheel-contents twine | |
| - name: Build package | |
| run: python -m build | |
| - name: Run linter | |
| run: python -m pre_commit run --all-files --show-diff-on-failure | |
| - name: Check wheel contents | |
| run: check-wheel-contents dist/*.whl | |
| - name: Check by twine | |
| run: python -m twine check dist/* | |
| test: | |
| strategy: | |
| matrix: | |
| pyver: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| - name: Setup Python ${{ matrix.pyver }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.pyver }} | |
| cache: pip | |
| cache-dependency-path: '**/requirements*.txt' | |
| - name: Install dependencies | |
| uses: py-actions/py-dependency-install@v4 | |
| with: | |
| path: requirements.txt | |
| - name: Run pytest | |
| run: pytest | |
| check: # This job does nothing and is only used for the branch protection | |
| if: always() | |
| needs: | |
| - lint | |
| - test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} | |
| deploy: | |
| name: Deploy | |
| environment: release | |
| # Run only on pushing a tag | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| needs: [lint, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install build | |
| run: python -m pip install build pre-commit check-wheel-contents twine | |
| - name: Build package | |
| run: python -m build | |
| - name: PyPI upload | |
| uses: pypa/gh-action-pypi-publish@v1.12.4 | |
| with: | |
| packages_dir: dist | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| - name: GitHub Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: pytest-aiohttp ${{ github.ref_name }} | |
| artifacts: dist/* | |
| bodyFile: README.rst | |
| token: ${{ secrets.GITHUB_TOKEN }} |