Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .coverage
Binary file not shown.
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Tests

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov coverage-badge

- name: Run tests with pytest and generate coverage
run: |
pytest --cov=penify_hook tests/ --cov-report=xml --cov-report=term

- name: Generate coverage badge
run: |
coverage-badge -o coverage.svg -f

- name: Commit coverage badge
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add coverage.svg
git diff --quiet && git diff --staged --quiet || git commit -m "Update coverage badge" -a

- name: Push coverage badge
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Penify CLI Tool

![Tests](https://github.com/yourorganization/penify-cli/workflows/Tests/badge.svg)
![Coverage](./coverage.svg)

A CLI tool to generate smart commit messages, code documentation, and more.

## Features

- Automatically generate documentation for your code
- Support for multiple programming languages
- Git hook integration for automatic documentation on commits
- Folder and file analysis

## Installation

Install from PyPI:
Expand Down Expand Up @@ -129,6 +139,12 @@ To set up the development environment:
pip install -e .
```

### Running Tests

```bash
pytest
```

## License

This project is licensed under the MIT License.
Expand Down
Loading
Loading