Skip to content

Commit cd374b6

Browse files
author
北词你好
committed
update tests
1 parent e6a3371 commit cd374b6

File tree

6 files changed

+550
-0
lines changed

6 files changed

+550
-0
lines changed

.coveragerc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[run]
2+
source = dataload
3+
4+
[report]
5+
exclude_lines =
6+
pragma: no cover
7+
def __repr__
8+
raise NotImplementedError
9+
10+
[html]
11+
directory = coverage_html

.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Test and Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Python
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.8 # 可以根据需要调整版本
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install pytest coverage coveralls
28+
29+
- name: Run tests with coverage
30+
run: |
31+
coverage run -m pytest
32+
coverage report
33+
coverage xml
34+
35+
- name: Upload coverage to Coveralls
36+
run: coveralls
37+
env:
38+
COVERALLS_REPO_TOKEN: ${BT5jHgLymAMbNQ598m4JVMFmvj0hWbpW9}

dataload/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .dataloader import *

0 commit comments

Comments
 (0)