We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2309b2d commit f191268Copy full SHA for f191268
1 file changed
.github/workflows/coverage.yml
@@ -0,0 +1,29 @@
1
+name: Code Coverage
2
+
3
+on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
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
24
+ pytest tests/ --cov=NLPModel --cov-report xml
25
+ - name: Upload coverage to Codecov
26
+ uses: codecov/codecov-action@v3
27
28
+ token: ${{ secrets.CODECOV_TOKEN }}
29
+ file: ./coverage.xml
0 commit comments