File tree Expand file tree Collapse file tree 5 files changed +47
-14
lines changed
Expand file tree Collapse file tree 5 files changed +47
-14
lines changed Original file line number Diff line number Diff line change 1+ name : GPU tests + code coverage
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+ push :
7+ branches :
8+ - main
9+
10+
11+ jobs :
12+ test_coverage :
13+ runs-on : ParallelHoss
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 1
19+
20+ - uses : actions/setup-python@v4
21+ with :
22+ python-version : 3.11.5
23+ cache : ' pip'
24+
25+ - name : Run Tests
26+ run : |
27+ python -m venv venv
28+ source venv/bin/activate
29+ pip install -e .[test]
30+ coverage run --source=genlm_backend -m pytest --benchmark-disable
31+ coverage json --omit "*/test*"
32+ coverage report --omit "*/test*"
33+
34+ - name : Upload coverage to Codecov
35+ uses : codecov/codecov-action@v5
36+ with :
37+ fail_ci_if_error : false
38+ disable_search : true
39+ token : ${{ secrets.CODECOV_TOKEN }}
40+ files : ./coverage.json
Original file line number Diff line number Diff line change 2020 - name : Set up Python
2121 uses : actions/setup-python@v4
2222 with :
23- python-version : ' 3.10'
23+ python-version : ' 3.11.5'
24+ cache : ' pip'
2425
2526 - name : Install dependencies
2627 run : |
Original file line number Diff line number Diff line change 1111
1212jobs :
1313 test :
14- strategy :
15- matrix :
16- runner : [ubuntu-22.04, ParallelHoss]
17- runs-on : ${{ matrix.runner }}
14+ runs-on : ubuntu-22.04
1815
1916 steps :
2017 - uses : actions/checkout@v4
@@ -24,18 +21,11 @@ jobs:
2421 - uses : actions/setup-python@v4
2522 with :
2623 python-version : 3.11.5
27-
28- - name : Cache pip packages
29- uses : actions/cache@v3
30- with :
31- path : ~/.cache/pip
32- key : ${{ runner.os }}-${{ matrix.runner }}-pip-${{ hashFiles('**/setup.py', '**/requirements.txt') }}
33- restore-keys : |
34- ${{ runner.os }}-${{ matrix.runner }}-pip-
24+ cache : ' pip'
3525
3626 - name : Run Tests
3727 run : |
3828 python -m venv venv
3929 source venv/bin/activate
4030 pip install -e .[test]
41- pytest tests/
31+ pytest tests
Original file line number Diff line number Diff line change 11[ ![ Docs] ( https://github.com/chi-collective/genlm-backend/actions/workflows/docs.yml/badge.svg )] ( https://probcomp.github.io/genlm-backend/ )
22[ ![ Tests] ( https://github.com/chi-collective/genlm-backend/actions/workflows/pytest.yml/badge.svg )] ( https://github.com/probcomp/genlm-backend/actions/workflows/pytest.yml )
3+ [ ![ codecov] ( https://codecov.io/github/chi-collective/genlm-backend/graph/badge.svg?token=AS70lcuXra )] ( https://codecov.io/github/chi-collective/genlm-backend )
34
45# GenLM Backend
56
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ dependencies = [
2020
2121[project .optional-dependencies ]
2222test = [
23+ " coverage" ,
2324 " pytest" ,
2425 " pytest-benchmark" ,
2526 " arsenal @ git+https://github.com/timvieira/arsenal" ,
You can’t perform that action at this time.
0 commit comments