-
Notifications
You must be signed in to change notification settings - Fork 163
48 lines (43 loc) · 1.43 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
---
name: reviewdog
# run reviewdog for PR only because "github-check" option is failing :(
# https://github.com/reviewdog/reviewdog/issues/924
on: [pull_request]
jobs:
reviewdog_python:
name: reviewdog - Python lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: setup.py
- uses: reviewdog/action-setup@master
with:
reviewdog_version: latest
- name: Install dependencies
shell: bash
run: |
scripts/ci-install-deps.sh
pip install flake8 pylint mypy black types-setuptools
- name: Set env for PR
if: github.event_name == 'pull_request'
shell: bash
run: echo "REWIEVDOG_REPORTER=github-pr-review" >> $GITHUB_ENV
- name: Set env for push
if: github.event_name != 'pull_request'
shell: bash
run: echo "REWIEVDOG_REPORTER=github-check" >> $GITHUB_ENV
- name: Run reviewdog
shell: bash
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
reviewdog -list
reviewdog -tee -runners=mypy,black -reporter=${{ env.REWIEVDOG_REPORTER }} -fail-on-error=false