-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.39 KB
/
cov.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: cov
on:
push
jobs:
cov_job:
runs-on: ubuntu-latest
name: checking coverage
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v3
- name: set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3
- name: install whatever
run: pip install .
- name: install pytest
run: pip install pytest
- name: launch test
run: python3 -m pytest
- name: launch coverage
run:
coverage run -m pytest
- name: cov_comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v3
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
name: python-coverage-comment-action
# If you use a different name, update COMMENT_FILENAME accordingly
path: python-coverage-comment-action.txt