@@ -19,6 +19,7 @@ concurrency:
1919
2020permissions :
2121 contents : read
22+ pull-requests : write
2223
2324# hack for https://github.com/actions/cache/issues/810#issuecomment-1222550359
2425env :
8384 pip install -r test-requirements.txt
8485 python -m pytest ${{ matrix.cov-reports }} tests
8586
86- - name : " Save coverage files"
87- uses : actions/upload-artifact@v3
88- if : ${{ matrix.cov-reports }}
89- with :
90- name : cov-reports
91- path : |
92- htmlcov/
93- .coverage
94- coverage.xml
95-
96- - name : " Add comment with coverage info to PR"
87+ - name : " Calculate coverage"
9788 if : ${{ success() }} && ${{ github.event.issue.pull_request }}
9889 run : |
9990 set -x # print commands that are executed
@@ -110,7 +101,7 @@ jobs:
110101 echo COV_BODY="$COV_BODY_INTRO " >> $GITHUB_ENV
111102 fi
112103
113- - name : " Add comment with cov diff to PR"
104+ - name : " Add comment with coverage info to PR"
114105 uses : actions/github-script@v6
115106 if : ${{ success() }} && ${{ github.event.issue.pull_request }}
116107 with :
@@ -121,4 +112,14 @@ jobs:
121112 owner: context.repo.owner,
122113 repo: context.repo.repo,
123114 body: '${{ env.COV_BODY }}'
124- })
115+ })
116+
117+ - name : " Save coverage files"
118+ uses : actions/upload-artifact@v3
119+ if : ${{ matrix.cov-reports }}
120+ with :
121+ name : cov-reports
122+ path : |
123+ htmlcov/
124+ .coverage
125+ coverage.xml
0 commit comments