-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1.12 KB
/
ci.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
name: CI
on:
pull_request:
push:
branches:
- "main"
concurrency:
group: CI
jobs:
test:
name: Run tests & display/prepare coverage
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e .
working-directory: subdir
- run: pytest
working-directory: subdir
- name: Coverage comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@48fdeca97508505ed2a87c23e3cbf049fd549788
with:
GITHUB_TOKEN: ${{ github.token }}
ANNOTATE_MISSING_LINES: true
ANNOTATION_TYPE: notice
COVERAGE_PATH: subdir
SUBPROJECT_ID: "my-great-project"
- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action*.txt