-
Notifications
You must be signed in to change notification settings - Fork 113
45 lines (40 loc) · 1.23 KB
/
Codecov.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
name: Workflow for Codecov f2
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install pytest
pip install pytest-cov
pip install -e .
- name: Print environment variable
run: echo $SKIP_IN_CI
env:
SKIP_IN_CI: ${{ secrets.SKIP_IN_CI }}
- name: Run tests and collect coverage
env:
SKIP_IN_CI: ${{ secrets.SKIP_IN_CI }}
run: pytest --cov=./ --cov-report=xml
- name: Run ATS
uses: codecov/codecov-ats@v0
env:
SKIP_IN_CI: ${{ secrets.SKIP_IN_CI }} # 从GitHub Secrets中获取环境变量
CODECOV_STATIC_TOKEN: ${{ secrets.CODECOV_STATIC_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
slug: Johnserf-Seed/f2
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}