-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore/ci: linter with reviewdog (#625)
* chore/ci: linter with reviewdog - add separate linter github actions - add reviewdog installer shell - update .gitignore fir ./bin folder * chore: revert condition Signed-off-by: Hiroshi Miura <miurahr@linux.com> * chore: control reviewdog with config - Add .reviewdog.yml - Update github actions script --------- Signed-off-by: Hiroshi Miura <miurahr@linux.com>
- Loading branch information
Showing
8 changed files
with
472 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Run linter | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
linter: | ||
name: Linter | ||
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: Setup reviewdog | ||
run: | | ||
/usr/bin/sh utils/reviewdog_install.sh -b ./bin/ v0.20.3 | ||
- name: Install dependencies | ||
run: | | ||
pip install -U pip tox wheel setuptools setuptools_scm[toml] | ||
pip install .[check] | ||
- name: run reviewdog | ||
run: | | ||
./bin/reviewdog -runners=flake8,mypy,pylint -reporter=github-pr-check -conf=.reviewdog.yml | ||
env: | ||
REVIEWDOG_TOKEN: ${{ secrets.REVIEWDOG_TOKEN }} | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ type_info.json | |
coverage.xml | ||
py7zr/version.py | ||
prof | ||
cmake-build-debug | ||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
runner: | ||
flake8: | ||
name: flake8 | ||
cmd: flake8 py7zr tests | ||
format: flake8 | ||
level: error | ||
|
||
mypy: | ||
name: mypy | ||
cmd: mypy --strict --show-column-numbers -p py7zr | ||
errorformat: | ||
- "%f:%l:%c: %m" | ||
level: error | ||
|
||
pylint: | ||
name: pylint | ||
cmd: pylint **/*.py -j 0 | ||
errorformat: | ||
- "%f:%l:%c: %t%n: %m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.