Skip to content

Merge pull request #289 from Maxxxxxx-x/feat/login-records #37

Merge pull request #289 from Maxxxxxx-x/feat/login-records

Merge pull request #289 from Maxxxxxx-x/feat/login-records #37

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