-
Notifications
You must be signed in to change notification settings - Fork 117
46 lines (43 loc) · 1.22 KB
/
python_lint.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
name: "Lint Python code"
on:
push:
branches:
- main
pull_request:
paths:
- 'example/python/**.py'
- 'crates/voicevox_core_python_api/**.py'
- 'crates/voicevox_core_python_api/requirements*.txt'
- 'crates/voicevox_core_python_api/pyproject.toml'
- '.github/workflows/python_lint.yml'
defaults:
run:
shell: bash
working-directory: ./crates/voicevox_core_python_api
jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install Poetry
run: |
python -m pip install --upgrade poetry
poetry config virtualenvs.create false
- name: Validate poetry.lock
run: |
poetry lock --no-update
git diff --exit-code
- name: Install dependencies
run: poetry install --with test
- name: Check code style for voicevox_core_python_api
run: |
black --check .
isort --check .
- name: Check code style for example/python
working-directory: ./example/python
run: |
black --check --diff .
isort --check --diff --profile black .