Skip to content

Commit 574e65f

Browse files
committed
✨ 新增Codecov
1 parent 27a7cd1 commit 574e65f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/codecov.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Workflow for Codecov example-python
2+
on: [push, pull_request]
3+
jobs:
4+
run:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
- name: Set up Python 3.10
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.10'
15+
- name: Install dependencies
16+
run: pip install -r requirements.txt
17+
- name: Run ATS
18+
uses: codecov/codecov-ats@v0
19+
env:
20+
CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }}
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
22+
- name: Run tests and collect coverage
23+
run: pytest --cov app ${{ env.CODECOV_ATS_TESTS }}
24+
- name: Upload coverage to Codecov
25+
uses: codecov/codecov-action@v4
26+
with:
27+
flags: smart-tests
28+
verbose: true
29+
env:
30+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)