@@ -29,17 +29,13 @@ jobs:
2929
3030That'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- 
184- ` ` `
185-
186- 2. **GitHub URL** (` badge-style: 'url'`):
187- ` ` ` markdown
188- 
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
199- 
200- 
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
293182If badges aren't being committed:
@@ -302,9 +191,9 @@ If badges aren't being committed:
302191
3031923. 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
3091981. Check that `requirements-file` path is correct
3101992. Verify your requirements file has correct syntax
@@ -318,26 +207,19 @@ To debug test failures:
3182071. Review the detailed output in the GitHub Actions summary
3192082. Run tests locally with the same options
3202093. 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
329217If tests are in a non-standard location :
330218
331- For pytest :
332219` ` ` yaml
333220pytest-options: 'path/to/tests/'
334221` ` `
335222
336- For unittest :
337- ` ` ` yaml
338- unittest-options: '-s path/to/tests'
339- ` ` `
340-
341223# # Best Practices
342224
3432251. **Use a requirements file** : Specify all test dependencies
0 commit comments