fix: フォーマットの修正2 #90
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
name: CI-Python | |
on: [push, pull_request] | |
jobs: | |
CI-Python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- run: poetry install | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-root | |
- name: Run tests | |
run: poetry run pytest | |
# カバレッジレポート(テストの網羅率)を生成してジョブのサマリーに追加する | |
- name: Generage coverage report | |
id: generate_coverage_report | |
run: | | |
poetry run coverage run -m pytest | |
# Job Summaries にカバレッジの概要を設定する | |
echo '## Coverage' >> ${GITHUB_STEP_SUMMARY} | |
echo '```' >> ${GITHUB_STEP_SUMMARY} | |
poetry run python -m coverage report >> ${GITHUB_STEP_SUMMARY} | |
echo '```' >> ${GITHUB_STEP_SUMMARY} | |
poetry run coverage report | |
# PythonのコードをPEP8のガイドラインに基づいてチェックするためのツール | |
- name: Format check | |
run: | | |
poetry run python -m pycodestyle src/ tests/ | |
poetry run python -m pydocstyle src/ tests/ |