-
Notifications
You must be signed in to change notification settings - Fork 75
42 lines (36 loc) · 1.12 KB
/
linting.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
name: Linting
on:
push:
branches: [master]
pull_request:
jobs:
flake8:
name: Flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install flake8
run: python -m pip install -r ci/linting_requirements.txt
- 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: |
flake8 | reviewdog -f=pep8 -name=flake8 -reporter=github-check -filter-mode=nofilter
- name: Run doc8
# Don't skip doc8 if flake8 fails
if: ${{ always() }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
doc8 docs | reviewdog -efm='%f:%l: %m' -name=doc8 -reporter=github-check -filter-mode=nofilter