ci: fix lint action

This commit is contained in:
Dowon
2024-04-14 17:30:22 +09:00
parent 48af2214cc
commit 4821bdf483
2 changed files with 19 additions and 34 deletions

View File

@@ -1,34 +0,0 @@
name: Lint
on:
pull_request:
paths:
- "**.py"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install python packages
run: pip install black ruff pre-commit-hooks
- name: Run pre-commit-hooks
run: |
check-ast
trailing-whitespace-fixer --markdown-linebreak-ext=md
end-of-file-fixer
mixed-line-ending
- name: Run black
run: black --check .
- name: Run ruff
run: ruff check .

19
.github/workflows/notlint.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Not Lint
on:
pull_request:
types:
- opened
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: wow-actions/auto-comment@v1
with:
GITHUB_TOKEN: ${{ github.token }}
pullRequestOpened: |
![Imgur](https://i.imgur.com/ESow3BL.png)
LGTM