Skip to content

Commit bd296b5

Browse files
authored
Merge pull request #89 from QuLogic/mypy-review
Post mypy results to PR review
2 parents 03ca21b + f20e0f5 commit bd296b5

File tree

2 files changed

+43
-37
lines changed

2 files changed

+43
-37
lines changed

.github/workflows/mypy.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/reviewdog.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
name: Linting
3-
on: [pull_request]
3+
on:
4+
push:
5+
branches-ignore:
6+
- auto-backport-of-pr-[0-9]+
7+
- v[0-9]+.[0-9]+.[0-9x]+-doc
8+
pull_request:
49

510
jobs:
611
flake8:
@@ -33,3 +38,40 @@ jobs:
3338
flake8 | \
3439
reviewdog -f=pep8 -name=flake8 \
3540
-tee -reporter=github-check -filter-mode nofilter
41+
42+
mypy:
43+
name: "Mypy"
44+
runs-on: ubuntu-20.04
45+
46+
steps:
47+
- uses: actions/checkout@v3
48+
with:
49+
fetch-depth: 0
50+
51+
- name: Set up Python
52+
uses: actions/setup-python@v4
53+
54+
- name: Set up reviewdog
55+
run: |
56+
mkdir -p "$HOME/bin"
57+
curl -sfL \
58+
https://github.com/reviewdog/reviewdog/raw/master/install.sh | \
59+
sh -s -- -b "$HOME/bin"
60+
echo "$HOME/bin" >> $GITHUB_PATH
61+
62+
- name: Install Python dependencies
63+
run: |
64+
python -m pip install --upgrade pip
65+
python -m pip install --upgrade mypy==1.2.0
66+
67+
- name: Install cycler
68+
run: |
69+
python -m pip install --no-deps -e .
70+
71+
- name: Run mypy
72+
env:
73+
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
run: |
75+
mypy cycler test_cycler.py | \
76+
reviewdog -f=mypy -name=mypy \
77+
-tee -reporter=github-check -filter-mode nofilter

0 commit comments

Comments
 (0)