Skip to content

Commit

Permalink
chore/ci: setup reviewdog (miurahr#835)
Browse files Browse the repository at this point in the history
* chore/ci: setup reviewdog

Signed-off-by: Hiroshi Miura <[email protected]>

* chore/ci: apply reviewdog to mypy and check

Signed-off-by: Hiroshi Miura <[email protected]>

* chore/ci: set REVIEWDOG_GITHUB_API_TOKEN

Signed-off-by: Hiroshi Miura <[email protected]>

* chore/ci: use --fail-level=error for reviewdog

Signed-off-by: Hiroshi Miura <[email protected]>

* chore/ci: update tox config

Signed-off-by: Hiroshi Miura <[email protected]>

* chore: update lint checks with reviewdog

Signed-off-by: Hiroshi Miura <[email protected]>

* chore: checkout with lfs

Signed-off-by: Hiroshi Miura <[email protected]>

* chore: fix missing file

Signed-off-by: Hiroshi Miura <[email protected]>

* chore: remove unused token

Signed-off-by: Hiroshi Miura <[email protected]>

* chore: install linter

Signed-off-by: Hiroshi Miura <[email protected]>

---------

Signed-off-by: Hiroshi Miura <[email protected]>
  • Loading branch information
miurahr authored Dec 17, 2024
1 parent 7a12728 commit fa49772
Show file tree
Hide file tree
Showing 5 changed files with 464 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
pip install -U pip
pip install tox tox-gh-actions coveralls coverage[toml]
- name: Check
- name: Test
run: |
tox
coverage xml -o cobertura.xml
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/run-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run linter

on:
pull_request:

jobs:
linter:
name: Linter
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: x64
- name: Setup reviewdog
run: |
/usr/bin/sh ci/reviewdog_install.sh -b ./bin/ v0.20.3
- name: Install dependencies
run: |
pip install -U pip tox wheel setuptools coveralls coverage[toml]
pip install .[check]
- name: run reviewdog
run: |
./bin/reviewdog -runners=flake8,mypy,pylint -reporter=github-pr-check -conf=.reviewdog.yml
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs:
name: Document checks
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: x64
- name: Install dependencies
run: |
pip install -U pip tox wheel setuptools setuptools_scm[toml]
- name: docs build and link check
run: |
tox -e docs
19 changes: 19 additions & 0 deletions .reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
runner:
flake8:
name: flake8
cmd: flake8 aqt tests
format: flake8
level: error

mypy:
name: mypy
cmd: mypy --strict --show-column-numbers -p aqt
errorformat:
- "%f:%l:%c: %m"
level: error

pylint:
name: pylint
cmd: pylint **/*.py -j 0
errorformat:
- "%f:%l:%c: %t%n: %m"
Loading

0 comments on commit fa49772

Please sign in to comment.