Skip to content

Commit b422694

Browse files
authored
Merge pull request #61 from RyouMon/build-cov
Setup Codecov
2 parents 6c7fd1c + 1f27dfb commit b422694

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/python-package.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip
31-
python -m pip install flake8 pytest
31+
python -m pip install flake8 pytest pytest-cov
3232
python -m pip install -r requirements.txt
3333
- name: Lint with flake8
3434
run: |
@@ -39,8 +39,14 @@ jobs:
3939
- name: Run Test
4040
run: |
4141
cd src
42-
python -m pytest ../tests
42+
python -m pytest ../tests --cov --cov-report=xml
43+
mv .coverage ../.coverage
44+
mv coverage.xml ../coverage.xml
4345
- name: Check spiders contacts
4446
run: |
4547
cd src
46-
scrapy check
48+
scrapy check
49+
- name: Upload coverage reports to Codecov
50+
uses: codecov/codecov-action@v5
51+
with:
52+
token: ${{ secrets.CODECOV_TOKEN }}

codecov.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
comment:
2+
layout: " diff, flags, files"
3+
behavior: default
4+
require_changes: false
5+
require_base: false
6+
require_head: true
7+
hide_project_coverage: false

0 commit comments

Comments
 (0)