Skip to content

Commit f191268

Browse files
authored
duh
1 parent 2309b2d commit f191268

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Code Coverage
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
coverage:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.10'
18+
- name: Install dependencies
19+
run: |
20+
pip install torch==2.2.0+cu118 torchvision==0.17.0+cu118 torchaudio==2.2.0+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
21+
pip install pytest pytest-cov
22+
- name: Run tests with coverage
23+
run: |
24+
pytest tests/ --cov=NLPModel --cov-report xml
25+
- name: Upload coverage to Codecov
26+
uses: codecov/codecov-action@v3
27+
with:
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
file: ./coverage.xml

0 commit comments

Comments
 (0)