Skip to content

Commit d22e831

Browse files
authored
Updated docs (#199)
1 parent eb92283 commit d22e831

13 files changed

Lines changed: 2445 additions & 123 deletions
Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
2+
name: Bug Report
3+
about: Something isn't working as expected
4+
title: "[Bug] "
5+
labels: bug
66
assignees: ''
7-
87
---
98

10-
**Describe the bug**
9+
## Describe the Bug
1110
A clear and concise description of what the bug is.
1211

13-
**To Reproduce**
14-
Steps to reproduce the behavior:
15-
1. Go to '...'
16-
2. Click on '....'
17-
3. Scroll down to '....'
18-
4. See error
12+
## To Reproduce
13+
14+
**Minimal `conftest.py` or test file:**
15+
```python
16+
# paste the smallest test/config that reproduces the issue
17+
```
1918

20-
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
19+
**Command used:**
20+
```bash
21+
pytest --html=report.html ...
22+
```
2223

23-
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
24+
**What actually happened:**
25+
```
26+
paste output, traceback, or describe the incorrect behavior
27+
```
2528

26-
**Desktop (please complete the following information):**
27-
- OS: [e.g. iOS]
28-
- Browser [e.g. chrome, safari]
29-
- Version [e.g. 22]
29+
## Expected Behavior
30+
What did you expect to happen instead?
3031

31-
**Smartphone (please complete the following information):**
32-
- Device: [e.g. iPhone6]
33-
- OS: [e.g. iOS8.1]
34-
- Browser [e.g. stock browser, safari]
35-
- Version [e.g. 22]
32+
## Environment
33+
| | |
34+
|---|---|
35+
| `pytest-html-plus` version | e.g. 1.2.0 |
36+
| `pytest` version | e.g. 7.4.0 |
37+
| Python version | e.g. 3.11 |
38+
| OS | e.g. Ubuntu 22.04 / macOS 14 / Windows 11 |
3639

37-
**Additional context**
38-
Add any other context about the problem here.
40+
## Additional Context
41+
Any other context, screenshots, or generated HTML files that might help.
Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
2+
name: Feature Request
3+
about: Suggest an idea or improvement
4+
title: "[Feature] "
5+
labels: enhancement
66
assignees: ''
7-
87
---
98

10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
## Summary
10+
A one-line description of the feature you'd like.
11+
12+
## Problem It Solves
13+
What's the current limitation or pain point?
14+
_e.g. "When running a large test suite, I can't easily filter failures by..."_
15+
16+
## Proposed Solution
17+
Describe how you'd like it to work. If you have ideas on the API or CLI flags, show them:
18+
19+
```bash
20+
# e.g. a new CLI option
21+
pytest --html=report.html --html-group-by=module
22+
```
1223

13-
**Describe the solution you'd like**
14-
A clear and concise description of what you want to happen.
24+
```python
25+
# or a conftest hook / config option
26+
```
1527

16-
**Describe alternatives you've considered**
17-
A clear and concise description of any alternative solutions or features you've considered.
28+
## Alternatives Considered
29+
Any workarounds you've tried or other approaches you considered.
1830

19-
**Additional context**
20-
Add any other context or screenshots about the feature request here.
31+
## Additional Context
32+
Links to similar features in other tools, screenshots, mockups, or anything else useful.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## PR Checklist
2+
3+
Before submitting, please make sure you've done the following:
4+
5+
**Branch**
6+
- [ ] PR is targeting the correct upcoming version branch (e.g. `0.4.1`), not `main`
7+
8+
**Code**
9+
- [ ] Ran `make lint` with no errors
10+
- [ ] Ran `make test` and all tests pass
11+
- [ ] Added or updated tests for any new or changed behavior
12+
13+
**Docs**
14+
- [ ] Updated README if user-facing behavior changed
15+
- [ ] Updated ReadTheDocs documentation if applicable
16+
17+
**Changelog**
18+
- [ ] Added a short entry under the upcoming version in `CHANGELOG.md`
19+
20+
**General**
21+
- [ ] PR description explains *what* changed and *why*
22+
- [ ] Linked the related issue (if one exists) using `Closes #123`

.github/workflows/actions-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ name: Reporterplus marketplace actions test
22

33
on:
44
pull_request:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
- "[0-9]+\\.[0-9]+\\.[0-9]+"
68

79
workflow_dispatch:
810

11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
915
jobs:
1016
test:
1117
runs-on: ubuntu-latest
Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,103 @@
1-
name: Unit Tests on windows
1+
name: Unit Tests on Windows
22

33
on:
44
pull_request:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
- "[0-9]+\\.[0-9]+\\.[0-9]+"
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
613

714
jobs:
815
test:
916
runs-on: windows-latest
1017

1118
strategy:
1219
matrix:
13-
python-version: [ "3.11" ]
20+
python-version: ["3.11"]
1421

1522
steps:
1623
- name: 📥 Checkout code
17-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
1825

1926
- name: 🐍 Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@v5
2128
with:
2229
python-version: ${{ matrix.python-version }}
2330

24-
- name: Install Poetry
31+
- name: 📦 Install Poetry
2532
run: |
2633
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
2734
28-
- name: Add Poetry to PATH
35+
- name: 📦 Add Poetry to PATH
2936
run: |
3037
echo "$env:APPDATA\Python\Scripts" | Out-File -Append -Encoding ascii $env:GITHUB_PATH
3138
echo "Poetry PATH set to $env:APPDATA\Python\Scripts"
3239
33-
- name: Check Poetry Version
40+
- name: Check Poetry version
3441
run: poetry --version
3542

36-
- name: Configure Poetry
37-
run: poetry config virtualenvs.create false
43+
- name: 📦 Cache Poetry virtualenv
44+
uses: actions/cache@v4
45+
with:
46+
path: ~\AppData\Local\pypoetry\Cache
47+
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
48+
restore-keys: |
49+
${{ runner.os }}-poetry-${{ matrix.python-version }}-
3850
3951
- name: 📦 Install dependencies with Poetry
40-
run: |
41-
poetry lock
42-
poetry install --with dev
52+
run: poetry install --with dev --frozen
53+
54+
- name: 🔍 Lint with ruff
55+
run: poetry run ruff check .
4356

4457
- name: 🧪 Run tests with coverage
4558
run: |
46-
poetry run pytest --cov=pytest_html_plus tests/ --cov-fail-under=39 --cov-report=term --reruns 1 --ignore=tests/browser --generate-xml --xml-report final_xml_windows.xml --git-branch $(git rev-parse --abbrev-ref HEAD)
59+
$BRANCH = git rev-parse --abbrev-ref HEAD
60+
$COMMIT = git rev-parse HEAD
61+
poetry run pytest `
62+
--cov=pytest_html_plus `
63+
--cov-fail-under=39 `
64+
--cov-report=term `
65+
--reruns 1 `
66+
--ignore=tests/browser `
67+
--generate-xml `
68+
--xml-report final_xml_windows.xml `
69+
--git-branch "$BRANCH" `
70+
--git-commit "$COMMIT" `
71+
tests/
4772
4873
- name: 🧪 Run tests with warnings enabled
4974
run: |
50-
$env:PYTHONWARNINGS="error"; poetry run pytest --cov=pytest_html_plus tests/ --cov-fail-under=39 --cov-report=term --reruns 1 --ignore=tests/browser --generate-xml --html-output=report_output_warnings --xml-report final_xml_windows_with_warnings.xml --git-branch $(git rev-parse --abbrev-ref HEAD)
75+
$BRANCH = git rev-parse --abbrev-ref HEAD
76+
$COMMIT = git rev-parse HEAD
77+
$env:PYTHONWARNINGS = "error"
78+
poetry run pytest `
79+
--cov=pytest_html_plus `
80+
--cov-fail-under=39 `
81+
--cov-report=term `
82+
--reruns 1 `
83+
--ignore=tests/browser `
84+
--generate-xml `
85+
--xml-report final_xml_windows_with_warnings.xml `
86+
--html-output=report_output_warnings `
87+
--git-branch "$BRANCH" `
88+
--git-commit "$COMMIT" `
89+
tests/
5190
52-
- name: Upload HTML Report
91+
- name: 📤 Upload HTML Report
5392
if: always()
5493
uses: actions/upload-artifact@v4
5594
with:
5695
name: report-windows-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
57-
path:
58-
report_output/
96+
path: report_output/
5997

60-
- name: Upload HTML warnings report
98+
- name: 📤 Upload HTML Warnings Report
6199
if: always()
62100
uses: actions/upload-artifact@v4
63101
with:
64102
name: report-warnings-windows-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
65-
path:
66-
report_output_warnings/
103+
path: report_output_warnings/

.github/workflows/unit-test.yml

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,28 @@ name: Unit Tests
22

33
on:
44
pull_request:
5-
branches: [ main ]
5+
branches:
6+
- main
7+
- "[0-9]+\\.[0-9]+\\.[0-9]+"
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
612

713
jobs:
814
test:
915
runs-on: ubuntu-latest
1016

1117
strategy:
1218
matrix:
13-
python-version: ["3.10", "3.11", "3.12", "3.13" ]
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1420

1521
steps:
1622
- name: 📥 Checkout code
17-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
1824

1925
- name: 🐍 Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v5
2127
with:
2228
python-version: ${{ matrix.python-version }}
2329

@@ -26,36 +32,63 @@ jobs:
2632
curl -sSL https://install.python-poetry.org | python3 -
2733
echo "$HOME/.local/bin" >> $GITHUB_PATH
2834
35+
- name: 📦 Cache Poetry virtualenv
36+
uses: actions/cache@v4
37+
with:
38+
path: ~/.cache/pypoetry
39+
key: ${{ runner.os }}-poetry-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-poetry-${{ matrix.python-version }}-
42+
2943
- name: 📦 Install dependencies with Poetry
30-
run: |
31-
poetry lock
32-
poetry install --with dev
44+
run: poetry install --with dev --frozen
45+
46+
- name: 🔍 Lint with ruff
47+
run: poetry run ruff check .
3348

3449
- name: 🧪 Run tests with coverage
3550
run: |
3651
export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
3752
export REPORT_COMMIT="$(git rev-parse HEAD)"
38-
poetry run pytest --cov=pytest_html_plus tests/ --cov-fail-under=39 --cov-report=term --reruns 1 --ignore=tests/browser --generate-xml --xml-report final_xml_ubuntu.xml --git-branch "$REPORT_BRANCH" --git-commit "$REPORT_COMMIT"
53+
poetry run pytest \
54+
--cov=pytest_html_plus \
55+
--cov-fail-under=39 \
56+
--cov-report=term \
57+
--reruns 1 \
58+
--ignore=tests/browser \
59+
--generate-xml \
60+
--xml-report final_xml_ubuntu.xml \
61+
--git-branch "$REPORT_BRANCH" \
62+
--git-commit "$REPORT_COMMIT" \
63+
tests/
3964
4065
- name: 🧪 Run tests with warnings enabled
4166
run: |
4267
export REPORT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
4368
export REPORT_COMMIT="$(git rev-parse HEAD)"
44-
PYTHONWARNINGS=error poetry run pytest --cov=pytest_html_plus tests/ --cov-fail-under=39 --cov-report=term --reruns 1 --ignore=tests/browser --generate-xml --xml-report final_xml_ubuntu_warnings.xml --html-output=report_output_warnings --git-branch "$REPORT_BRANCH" --git-commit "$REPORT_COMMIT"
45-
69+
PYTHONWARNINGS=error poetry run pytest \
70+
--cov=pytest_html_plus \
71+
--cov-fail-under=39 \
72+
--cov-report=term \
73+
--reruns 1 \
74+
--ignore=tests/browser \
75+
--generate-xml \
76+
--xml-report final_xml_ubuntu_warnings.xml \
77+
--html-output=report_output_warnings \
78+
--git-branch "$REPORT_BRANCH" \
79+
--git-commit "$REPORT_COMMIT" \
80+
tests/
4681
47-
- name: Upload HTML Report
82+
- name: 📤 Upload HTML Report
4883
if: always()
4984
uses: actions/upload-artifact@v4
5085
with:
5186
name: report-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
52-
path:
53-
report_output/
87+
path: report_output/
5488

55-
- name: Upload HTML warnings Report
89+
- name: 📤 Upload HTML Warnings Report
5690
if: always()
5791
uses: actions/upload-artifact@v4
5892
with:
5993
name: report-warnings-${{ github.job }}-${{ github.run_number }}-${{ matrix.python-version }}
60-
path:
61-
report_output_warnings/
94+
path: report_output_warnings/

0 commit comments

Comments
 (0)