Skip to content

deps:(deps-dev): update spacy[transformers] requirement from <3.7.0,>=3.2.0 to >=3.2.0,<3.8.0 #175

deps:(deps-dev): update spacy[transformers] requirement from <3.7.0,>=3.2.0 to >=3.2.0,<3.8.0

deps:(deps-dev): update spacy[transformers] requirement from <3.7.0,>=3.2.0 to >=3.2.0,<3.8.0 #175

Workflow file for this run

# We do not include mypy as a pre-commit hook because pre-commit hooks
# are installed in their own virtual environment, so mypy cannot
# use stubs from imports
name: mypy
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
mypy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
concurrency:
group: "${{ github.workflow }} @ ${{ github.ref }}"
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
- name: Cache venv
uses: actions/[email protected]
id: cache_venv
with:
path: |
.venv
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
- name: Set up Python
uses: actions/setup-python@v4
id: setup_python
if: steps.cache_venv.outputs.cache-hit != 'true'
with:
python-version: "3.9"
- name: Install dependencies
shell: bash
if: steps.cache_venv.outputs.cache-hit != 'true'
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Cache mypy cache
uses: actions/[email protected]
with:
path: .mypy_cache
key: ${{ runner.os }}-mypy-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
- name: Run mypy
id: mypy
continue-on-error: true
run: |
source .venv/bin/activate
if mypy src; then
echo "mypy check passed"
echo "mypy_failed=0" >> $GITHUB_OUTPUT
else
echo "mypy check failed"
echo "mypy_failed=1" >> $GITHUB_OUTPUT
fi
- name: Find Comment
uses: peter-evans/find-comment@v2
id: find_comment
if: ${{github.event_name == 'pull_request'}}
continue-on-error: true
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-includes: ✨ Looks like mypy failed ✨
- uses: mshick/add-pr-comment@v2
if: ${{ steps.mypy.outputs.mypy_failed == 1 && github.event_name == 'pull_request'}}
id: add_comment
with:
message: |
✨ Looks like mypy failed ✨
If you want to fix this, we recommend doing it locally by:
1. Installing mypy, which is included in the dev dependencies: `pip install -e ".[dev]"`
2. Diagnosing the errors by running `mypy .`
- uses: mshick/add-pr-comment@v2
if: ${{ steps.mypy.outputs.mypy_failed == 0 && steps.find_comment.outputs.comment-id != '' && github.event_name == 'pull_request'}}
with:
message-id: ${{ steps.find_comment.outputs.comment-id }}
message: |
🌟 mypy succeeds! 🌟
- name: fail run if mypy failed
id: fail_run
if: ${{steps.mypy.outputs.mypy_failed == 1}}
run: |
exit 1