Skip to content

Merge pull request #280 from toto6038/bump_python3.11 #39

Merge pull request #280 from toto6038/bump_python3.11

Merge pull request #280 from toto6038/bump_python3.11 #39

name: Generate Coverage Badge
on:
push:
branches:
- develop
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Poetry
run: pipx install poetry
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "poetry"
- name: Install Dependency
run: poetry install
- name: Format
run: poetry run yapf -- --recursive --parallel --diff .
- name: Unit test
run: |
poetry run pytest -- --cov=./ --cov-report=html:report --cov-config=.coveragerc
poetry run coverage report
# coverage-report
- name: Coverage Badge
uses: tj-actions/coverage-badge-py@v2
with:
output: report/coverage.svg
- name: Remove gitignore
run: rm report/.gitignore
- name: Publish coverage report to gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./report