Skip to content

Commit cd5aa23

Browse files
authored
Update GitHub Actions workflow for Python app
Added permissions for checks and enhanced pytest command with verbose output and JUnit report generation.
1 parent b1f4837 commit cd5aa23

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/python-app.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
build:
1717

1818
runs-on: ubuntu-latest
19+
permissions:
20+
checks: write
1921

2022
steps:
2123
- uses: actions/checkout@v3
@@ -36,4 +38,11 @@ jobs:
3638
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3739
- name: Test with pytest
3840
run: |
39-
pytest
41+
python -m pytest --verbose --junit-xml=junit.xml
42+
- name: Publish Test Report
43+
uses: mikepenz/action-junit-report@v3
44+
if: success() || failure() # always run even if the previous step fails
45+
with:
46+
report_paths: '**/junit.xml'
47+
detailed_summary: true
48+
include_passed: true

0 commit comments

Comments
 (0)