-
Notifications
You must be signed in to change notification settings - Fork 51
79 lines (67 loc) · 1.93 KB
/
reviewdog.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
name: Linting
on:
push:
branches-ignore:
- auto-backport-of-pr-[0-9]+
- v[0-9]+.[0-9]+.[0-9x]+-doc
pull_request:
jobs:
flake8:
name: flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install flake8
run: pip3 install flake8
- name: Set up reviewdog
run: |
mkdir -p "$HOME/bin"
curl -sfL \
https://github.com/reviewdog/reviewdog/raw/master/install.sh | \
sh -s -- -b "$HOME/bin"
echo "$HOME/bin" >> $GITHUB_PATH
- name: Run flake8
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o pipefail
flake8 | \
reviewdog -f=pep8 -name=flake8 \
-tee -reporter=github-check -filter-mode nofilter
mypy:
name: "Mypy"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Set up reviewdog
run: |
mkdir -p "$HOME/bin"
curl -sfL \
https://github.com/reviewdog/reviewdog/raw/master/install.sh | \
sh -s -- -b "$HOME/bin"
echo "$HOME/bin" >> $GITHUB_PATH
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade mypy==1.5.1
- name: Install cycler
run: |
python -m pip install --no-deps -e .
- name: Run mypy
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mypy cycler test_cycler.py | \
reviewdog -f=mypy -name=mypy \
-tee -reporter=github-check -filter-mode nofilter