-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (34 loc) · 854 Bytes
/
mypy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Check for MyPy type hints
on:
push:
pull_request:
branches:
- master
jobs:
mypy:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: pip install mypy
- name: MyPy
run: python -m mypy .
- name: Comment on PR
uses: actions/github-script@v3
if: failure()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'This PR introduces MyPy errors'
})