Fix typo in 'Regulatory' in README.md #49
This file contains hidden or 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: coverage | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| jobs: | |
| coverage: | |
| name: Coverage report | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/install-python-and-package | |
| with: | |
| python-version: '3.12' | |
| - name: Run unit tests with coverage | |
| run: pytest --cov --cov-report xml --cov-report html tests/ -m "not dashboard" | |
| - name: Write coverage summary | |
| run: | | |
| { | |
| echo "## Coverage Report" | |
| echo "" | |
| python -m coverage report --format=markdown | |
| } >> $GITHUB_STEP_SUMMARY | |
| - name: Generate coverage badge | |
| run: | | |
| pip install genbadge[coverage] | |
| genbadge coverage -i coverage.xml -o coverage.svg | |
| - name: Upload HTML coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-html-report | |
| path: htmlcov/ | |
| - name: Publish coverage badge to badges branch | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git fetch origin badges || true | |
| git worktree add /tmp/badges-branch badges 2>/dev/null || \ | |
| git worktree add -b badges /tmp/badges-branch origin/badges 2>/dev/null || \ | |
| git worktree add --orphan -b badges /tmp/badges-branch | |
| cp coverage.svg /tmp/badges-branch/coverage.svg | |
| cd /tmp/badges-branch | |
| git add coverage.svg | |
| git diff --staged --quiet || git commit -m "Update coverage badge [skip ci]" | |
| git push origin badges |