Skip to content

Commit

Permalink
Github Actions とpre-commitの適用 (#716)
Browse files Browse the repository at this point in the history
Co-authored-by: Hiroshiba Kazuyuki <kazuyuki_hiroshiba@dwango.co.jp>
  • Loading branch information
FujisakiEx and Hiroshiba authored Jul 18, 2023
1 parent 3974766 commit c964f5e
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements-test.txt
- name: Run poetry and check
run: |
poetry export --without-hashes -o requirements.txt.check
poetry export --without-hashes --with dev -o requirements-dev.txt.check
poetry export --without-hashes --with test -o requirements-test.txt.check
poetry export --without-hashes --with license -o requirements-license.txt.check
diff -q requirements.txt requirements.txt.check || \
diff -q requirements-dev.txt requirements-dev.txt.check || \
diff -q requirements-test.txt requirements-test.txt.check || \
diff -q requirements-license.txt requirements-license.txt.check > /dev/null
if [ $? = 1 ]; then
echo "poetry export has some diff"
exit 1
fi
- run: pysen run lint

- name: Run pytest and get coverage
Expand Down
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,27 @@ repos:
types: [file, python]
stages: [push]
pass_filenames: false
- id: poetry-export
name: poetry-export
entry: poetry export --without-hashes -o requirements.txt
language: python
stages: [push]
pass_filenames: false
- id: poetry-export-dev
name: poetry-export-dev
entry: poetry export --without-hashes --with dev -o requirements-dev.txt
language: python
stages: [push]
pass_filenames: false
- id: poetry-export-test
name: poetry-export-test
entry: poetry export --without-hashes --with test -o requirements-test.txt
language: python
stages: [push]
pass_filenames: false
- id: poetry-export-license
name: poetry-export-license
entry: poetry export --without-hashes --with license -o requirements-license.txt
language: python
stages: [push]
pass_filenames: false
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ isort = "^5.12.0"
mypy = "~0.991"
pytest = "^6.2.5"
coveralls = "^3.2.0"
poetry = "^1.3.1"

[tool.poetry.group.license.dependencies]
pip-licenses = "^4.2.0"
Expand Down
33 changes: 33 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,50 +5,78 @@ asgiref==3.6.0 ; python_version >= "3.11" and python_version < "3.12"
atomicwrites==1.4.0 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "win32"
attrs==22.2.0 ; python_version >= "3.11" and python_version < "3.12"
black==22.12.0 ; python_version >= "3.11" and python_version < "3.12"
cachecontrol[filecache]==0.12.11 ; python_version >= "3.11" and python_version < "3.12"
certifi==2022.12.7 ; python_version >= "3.11" and python_version < "3.12"
cffi==1.15.1 ; python_version >= "3.11" and python_version < "3.12"
charset-normalizer==2.1.1 ; python_version >= "3.11" and python_version < "3.12"
cleo==2.0.1 ; python_version >= "3.11" and python_version < "3.12"
click==8.0.4 ; python_version >= "3.11" and python_version < "3.12"
colorama==0.4.4 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "win32" or python_version >= "3.11" and python_version < "3.12" and platform_system == "Windows"
colorlog==4.8.0 ; python_version >= "3.11" and python_version < "3.12"
coverage==5.5 ; python_version >= "3.11" and python_version < "3.12"
coveralls==3.2.0 ; python_version >= "3.11" and python_version < "3.12"
crashtest==0.4.1 ; python_version >= "3.11" and python_version < "3.12"
cryptography==39.0.0 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "linux"
cython==0.29.34 ; python_version >= "3.11" and python_version < "3.12"
dacite==1.7.0 ; python_version >= "3.11" and python_version < "3.12"
distlib==0.3.6 ; python_version >= "3.11" and python_version < "3.12"
docopt==0.6.2 ; python_version >= "3.11" and python_version < "3.12"
dulwich==0.20.50 ; python_version >= "3.11" and python_version < "3.12"
fastapi==0.70.0 ; python_version >= "3.11" and python_version < "3.12"
filelock==3.8.2 ; python_version >= "3.11" and python_version < "3.12"
flake8-bugbear==23.1.20 ; python_version >= "3.11" and python_version < "3.12"
flake8==6.0.0 ; python_version >= "3.11" and python_version < "3.12"
gitdb==4.0.10 ; python_version >= "3.11" and python_version < "3.12"
gitpython==3.1.29 ; python_version >= "3.11" and python_version < "3.12"
h11==0.14.0 ; python_version >= "3.11" and python_version < "3.12"
html5lib==1.1 ; python_version >= "3.11" and python_version < "3.12"
idna==3.4 ; python_version >= "3.11" and python_version < "3.12"
importlib-metadata==4.13.0 ; python_version >= "3.11" and python_version < "3.12"
iniconfig==1.1.1 ; python_version >= "3.11" and python_version < "3.12"
isort==5.12.0 ; python_version >= "3.11" and python_version < "3.12"
jaraco-classes==3.2.3 ; python_version >= "3.11" and python_version < "3.12"
jeepney==0.8.0 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "linux"
jinja2==3.1.2 ; python_version >= "3.11" and python_version < "3.12"
jsonschema==4.17.3 ; python_version >= "3.11" and python_version < "3.12"
keyring==23.13.1 ; python_version >= "3.11" and python_version < "3.12"
lockfile==0.12.2 ; python_version >= "3.11" and python_version < "3.12"
markupsafe==2.1.2 ; python_version >= "3.11" and python_version < "3.12"
mccabe==0.7.0 ; python_version >= "3.11" and python_version < "3.12"
more-itertools==9.0.0 ; python_version >= "3.11" and python_version < "3.12"
msgpack==1.0.4 ; python_version >= "3.11" and python_version < "3.12"
mypy-extensions==0.4.3 ; python_version >= "3.11" and python_version < "3.12"
mypy==0.991 ; python_version >= "3.11" and python_version < "3.12"
numpy==1.24.2 ; python_version >= "3.11" and python_version < "3.12"
packaging==22.0 ; python_version >= "3.11" and python_version < "3.12"
pathspec==0.10.3 ; python_version >= "3.11" and python_version < "3.12"
pexpect==4.8.0 ; python_version >= "3.11" and python_version < "3.12"
pkginfo==1.9.4 ; python_version >= "3.11" and python_version < "3.12"
platformdirs==2.6.2 ; python_version >= "3.11" and python_version < "3.12"
pluggy==1.0.0 ; python_version >= "3.11" and python_version < "3.12"
poetry-core==1.4.0 ; python_version >= "3.11" and python_version < "3.12"
poetry-plugin-export==1.2.0 ; python_version >= "3.11" and python_version < "3.12"
poetry==1.3.1 ; python_version >= "3.11" and python_version < "3.12"
ptyprocess==0.7.0 ; python_version >= "3.11" and python_version < "3.12"
py==1.11.0 ; python_version >= "3.11" and python_version < "3.12"
pycodestyle==2.10.0 ; python_version >= "3.11" and python_version < "3.12"
pycparser==2.21 ; python_version >= "3.11" and python_version < "3.12"
pydantic==1.10.2 ; python_version >= "3.11" and python_version < "3.12"
pyflakes==3.0.1 ; python_version >= "3.11" and python_version < "3.12"
pyopenjtalk @ git+https://github.com/VOICEVOX/pyopenjtalk@827a3fc5c7dda7bbe832c0c69da98e39cc8cb2c3 ; python_version >= "3.11" and python_version < "3.12"
pyrsistent==0.19.3 ; python_version >= "3.11" and python_version < "3.12"
pysen==0.10.3 ; python_version >= "3.11" and python_version < "3.12"
pytest==6.2.5 ; python_version >= "3.11" and python_version < "3.12"
python-multipart==0.0.5 ; python_version >= "3.11" and python_version < "3.12"
pywin32-ctypes==0.2.0 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "win32"
pyworld==0.3.2 ; python_version >= "3.11" and python_version < "3.12"
pyyaml==6.0 ; python_version >= "3.11" and python_version < "3.12"
rapidfuzz==2.13.7 ; python_version >= "3.11" and python_version < "3.12"
requests-toolbelt==0.10.1 ; python_version >= "3.11" and python_version < "3.12"
requests==2.28.1 ; python_version >= "3.11" and python_version < "3.12"
scipy==1.10.1 ; python_version >= "3.11" and python_version < "3.12"
secretstorage==3.3.3 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "linux"
semver==3.0.0 ; python_version >= "3.11" and python_version < "3.12"
shellingham==1.5.0.post1 ; python_version >= "3.11" and python_version < "3.12"
six==1.16.0 ; python_version >= "3.11" and python_version < "3.12"
smmap==5.0.0 ; python_version >= "3.11" and python_version < "3.12"
sniffio==1.3.0 ; python_version >= "3.11" and python_version < "3.12"
Expand All @@ -57,7 +85,12 @@ starlette==0.16.0 ; python_version >= "3.11" and python_version < "3.12"
toml==0.10.2 ; python_version >= "3.11" and python_version < "3.12"
tomlkit==0.11.6 ; python_version >= "3.11" and python_version < "3.12"
tqdm==4.64.1 ; python_version >= "3.11" and python_version < "3.12"
trove-classifiers==2022.12.22 ; python_version >= "3.11" and python_version < "3.12"
typing-extensions==4.4.0 ; python_version >= "3.11" and python_version < "3.12"
unidiff==0.7.4 ; python_version >= "3.11" and python_version < "3.12"
urllib3==1.26.13 ; python_version >= "3.11" and python_version < "3.12"
uvicorn==0.15.0 ; python_version >= "3.11" and python_version < "3.12"
virtualenv==20.17.1 ; python_version >= "3.11" and python_version < "3.12"
webencodings==0.5.1 ; python_version >= "3.11" and python_version < "3.12"
xattr==0.10.1 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "darwin"
zipp==3.11.0 ; python_version >= "3.11" and python_version < "3.12"

0 comments on commit c964f5e

Please sign in to comment.