Skip to content

Commit ec628a8

Browse files
Update documentation to match action.yml implementation and add GitHub Marketplace best practices
Co-authored-by: thoughtparametersllc <194255310+thoughtparametersllc@users.noreply.github.com>
1 parent 61bfbdd commit ec628a8

File tree

7 files changed

+238
-245
lines changed

7 files changed

+238
-245
lines changed

.github/QUICK_START.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,42 +37,38 @@ jobs:
3737
- uses: actions/checkout@v4
3838
- uses: thoughtparametersllc/python-testing@v1
3939
with:
40-
generate-badges: 'true'
41-
update-readme: 'true'
40+
commit-badges: 'true'
4241
```
4342
44-
Badges will automatically appear in your README! 🏷️
43+
Then add badge to your README manually:
44+
45+
```markdown
46+
![Pytest](.github/badges/pytest.svg)
47+
```
4548

4649
## 3. With Custom Options (10 minutes)
4750

48-
Add framework-specific options:
51+
Add pytest-specific options:
4952

5053
```yaml
5154
- uses: thoughtparametersllc/python-testing@v1
5255
with:
5356
python-version: '3.11'
5457
requirements-file: 'requirements.txt'
5558
pytest-options: '--cov --cov-report=xml'
56-
behave-options: '--format=progress'
5759
```
5860
5961
## What Happens Automatically?
6062
61-
Detects your testing frameworks
62-
✅ Installs necessary dependencies
63-
✅ Runs all detected tests
63+
Installs pytest
64+
✅ Installs your requirements
65+
✅ Runs pytest tests
6466
✅ Generates detailed reports
6567
✅ Creates status badges (if enabled)
66-
✅ Updates README (if enabled)
6768
68-
## Supported Frameworks
69+
## Supported Framework
6970
7071
- **pytest** - Most popular Python testing framework
71-
- **unittest** - Built-in Python testing
72-
- **nose2** - Enhanced testing
73-
- **behave** - BDD/Cucumber-style testing
74-
- **tox** - Multi-environment testing
75-
- **doctest** - Documentation testing
7672
7773
## Next Steps
7874

.github/USAGE.md

Lines changed: 11 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@ jobs:
2929
3030
That's it! The action will automatically detect and run your testing frameworks.
3131
32-
## Framework Detection
32+
## Testing Framework
3333
34-
The action automatically detects which testing frameworks your project uses:
34+
This action runs pytest for your Python tests.
3535
3636
### pytest
3737
38-
Detected if any of these exist:
39-
- `pytest.ini` file
40-
- `pyproject.toml` file
41-
- `setup.cfg` file
42-
- `import pytest` in any Python file
38+
The action installs and runs pytest with your specified options.
4339
4440
**Example configuration:**
4541
```yaml
@@ -48,61 +44,6 @@ Detected if any of these exist:
4844
pytest-options: '--cov=mypackage --cov-report=xml'
4945
```
5046
51-
### unittest
52-
53-
Detected if:
54-
- `import unittest` found in test files (test*.py or *test.py)
55-
56-
**Example configuration:**
57-
```yaml
58-
- uses: thoughtparametersllc/python-testing@v1
59-
with:
60-
unittest-options: '-v -s tests'
61-
```
62-
63-
### nose2
64-
65-
Detected if any of these exist:
66-
- `.noserc` file
67-
- `nose.cfg` file
68-
- `[nosetests]` section in `setup.cfg`
69-
70-
**Example configuration:**
71-
```yaml
72-
- uses: thoughtparametersllc/python-testing@v1
73-
with:
74-
nose-options: '--verbose --with-coverage'
75-
```
76-
77-
### behave (BDD/Cucumber)
78-
79-
Detected if:
80-
- `features/` directory exists with `.feature` files
81-
82-
**Example configuration:**
83-
```yaml
84-
- uses: thoughtparametersllc/python-testing@v1
85-
with:
86-
behave-options: '--format=progress --tags=@automated'
87-
```
88-
89-
### tox
90-
91-
Detected if:
92-
- `tox.ini` file exists
93-
94-
**Example configuration:**
95-
```yaml
96-
- uses: thoughtparametersllc/python-testing@v1
97-
with:
98-
tox-options: '-e py311,py312'
99-
```
100-
101-
### doctest
102-
103-
Detected if:
104-
- `>>>` patterns found in Python files (indicating docstring tests)
105-
10647
## Configuration Options
10748
10849
### Python Version
@@ -125,18 +66,14 @@ Install additional dependencies before running tests:
12566
requirements-file: 'requirements-dev.txt'
12667
```
12768
128-
### Framework-Specific Options
69+
### pytest Options
12970
130-
Pass custom options to each testing framework:
71+
Pass custom options to pytest:
13172
13273
```yaml
13374
- uses: thoughtparametersllc/python-testing@v1
13475
with:
13576
pytest-options: '--cov --cov-report=xml --maxfail=1'
136-
unittest-options: '-v -s tests'
137-
nose-options: '--verbose --with-timer'
138-
behave-options: '--tags=@smoke --format=pretty'
139-
tox-options: '-e py311'
14077
```
14178
14279
## Badge Generation
@@ -157,47 +94,18 @@ jobs:
15794

15895
- uses: thoughtparametersllc/python-testing@v1
15996
with:
160-
generate-badges: 'true'
97+
commit-badges: 'true'
16198
badges-directory: '.github/badges'
16299
```
163100
164-
### Automatic README Updates
165-
166-
Automatically insert badge references in your README:
167-
168-
```yaml
169-
- uses: thoughtparametersllc/python-testing@v1
170-
with:
171-
generate-badges: 'true'
172-
update-readme: 'true'
173-
readme-path: 'README.md'
174-
badge-style: 'path' # or 'url'
175-
```
176-
177-
### Badge Styles
178-
179-
Two badge styles are available:
180-
181-
1. **Relative Path** (`badge-style: 'path'`):
182-
```markdown
183-
![Pytest](.github/badges/pytest.svg)
184-
```
185-
186-
2. **GitHub URL** (`badge-style: 'url'`):
187-
```markdown
188-
![Pytest](https://raw.githubusercontent.com/owner/repo/main/.github/badges/pytest.svg)
189-
```
190-
191101
### Manual Badge Reference
192102
193-
If not using automatic README updates, add badges manually:
103+
Add badges manually to your README:
194104
195105
```markdown
196106
# My Project
197107

198108
![Pytest](.github/badges/pytest.svg)
199-
![Unittest](.github/badges/unittest.svg)
200-
![Behave](.github/badges/behave.svg)
201109
```
202110

203111
## Advanced Usage
@@ -257,19 +165,9 @@ Generate coverage reports with pytest:
257165
files: ./coverage.xml
258166
```
259167
260-
### BDD Testing with Behave
261-
262-
Run specific feature tags:
263-
264-
```yaml
265-
- uses: thoughtparametersllc/python-testing@v1
266-
with:
267-
behave-options: '--tags=@smoke,@critical --format=progress'
268-
```
269-
270168
### Conditional Testing
271169
272-
Run different frameworks on different branches:
170+
Run different options on different branches:
273171
274172
```yaml
275173
- uses: thoughtparametersllc/python-testing@v1
@@ -279,15 +177,6 @@ Run different frameworks on different branches:
279177
280178
## Troubleshooting
281179
282-
### No Frameworks Detected
283-
284-
If no frameworks are detected:
285-
286-
1. Check that your test files are in the repository
287-
2. Verify framework configuration files exist
288-
3. Ensure test imports are present in your code
289-
4. Review the detection summary in the Action output
290-
291180
### Badge Commit Failures
292181
293182
If badges aren't being committed:
@@ -302,9 +191,9 @@ If badges aren't being committed:
302191

303192
3. Verify the action has access to push to the repository
304193

305-
### Framework Installation Issues
194+
### Installation Issues
306195

307-
If a framework fails to install:
196+
If pytest or requirements fail to install:
308197

309198
1. Check that `requirements-file` path is correct
310199
2. Verify your requirements file has correct syntax
@@ -318,26 +207,19 @@ To debug test failures:
318207
1. Review the detailed output in the GitHub Actions summary
319208
2. Run tests locally with the same options
320209
3. Check for environment-specific issues (paths, dependencies)
321-
4. Enable verbose output with framework options:
210+
4. Enable verbose output:
322211
```yaml
323212
pytest-options: '--verbose --tb=long'
324-
unittest-options: '-v'
325213
```
326214

327215
### Custom Test Directories
328216

329217
If tests are in a non-standard location:
330218

331-
For pytest:
332219
```yaml
333220
pytest-options: 'path/to/tests/'
334221
```
335222

336-
For unittest:
337-
```yaml
338-
unittest-options: '-s path/to/tests'
339-
```
340-
341223
## Best Practices
342224

343225
1. **Use a requirements file**: Specify all test dependencies

.markdownlint.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"default": true,
3+
"MD013": {
4+
"line_length": 120,
5+
"heading_line_length": 120,
6+
"code_block_line_length": 120,
7+
"code_blocks": true,
8+
"tables": false,
9+
"headings": true,
10+
"strict": false,
11+
"stern": false
12+
},
13+
"MD033": {
14+
"allowed_elements": ["br", "img", "svg", "path", "g", "text", "rect", "linearGradient", "stop", "clipPath"]
15+
},
16+
"MD024": {
17+
"siblings_only": true
18+
},
19+
"MD041": false,
20+
"MD046": {
21+
"style": "fenced"
22+
}
23+
}

CHANGELOG.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,39 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.0.1] - 2025-12-19
8+
## [Unreleased]
99

10-
## [1.0.0] - 2025-12-19
10+
### Added
11+
12+
- SECURITY.md file with security policy and vulnerability reporting guidelines
13+
- .markdownlint.json configuration file for consistent markdown formatting
14+
- Comprehensive security best practices documentation
15+
16+
### Changed
17+
18+
- Updated README.md to accurately reflect actual action.yml inputs and functionality
19+
- Updated USAGE.md to match current pytest-only implementation
20+
- Updated QUICK_START.md to reflect actual badge generation workflow
21+
- Fixed CONTRIBUTING.md references from "Python Linting Action" to "Python Testing Action"
22+
- Fixed clone path in CONTRIBUTING.md from "python-linting" to "python-testing"
23+
- Removed documentation for non-existent inputs (unittest-options, nose-options, behave-options,
24+
tox-options, generate-badges, update-readme, readme-path, badge-style)
25+
- Updated feature list to reflect pytest-only support
26+
- Simplified framework detection section to reflect current implementation
27+
28+
### Fixed
29+
30+
- Documentation inconsistencies between action.yml and README.md
31+
- Incorrect action name references in CONTRIBUTING.md
1132

1233
## [1.0.1] - 2025-12-19
1334

14-
## [Unreleased]
35+
Initial release with pytest support
1536

16-
### Added
37+
## [1.0.0] - 2025-12-19
1738

18-
- Initial release of Python Testing Action
19-
- Automatic detection of Python testing frameworks
20-
- Support for pytest with configurable options
21-
- SVG badge generation for each detected framework
22-
- Detailed test results in GitHub Actions summary
23-
- Support for custom requirements file installation
24-
- Configurable Python version support
39+
Initial release with pytest support
2540

26-
## [1.0.0] - TBD
41+
## [0.0.1] - 2025-12-19
2742

28-
Initial release
43+
Initial development release

0 commit comments

Comments
 (0)