File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : unit tests
2+
3+ on :
4+ push : # run on every push or PR to any branch
5+ pull_request :
6+ schedule : # run automatically on main branch each Tuesday at 11am
7+ - cron : " 0 16 * * 2"
8+
9+ jobs :
10+ python-unit :
11+ name : Python unit tests
12+ runs-on : ubuntu-latest
13+ strategy :
14+ matrix :
15+ python : ["3.12"]
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Setup Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ${{ matrix.python }}
24+
25+ # We base the python cache on the hash of all requirements files, so that
26+ # if any change, the cache is invalidated.
27+ - name : Cache pip
28+ uses : actions/cache@v4
29+ with :
30+ path : ~/.cache/pip
31+ key : pip-${{ hashFiles('pyproject.toml') }}
32+ restore-keys : |
33+ pip-${{ hashFiles('pyproject.toml') }}
34+ pip-
35+
36+ - name : Install package with dependencies
37+ run : |
38+ pip install -e .
39+ pip install -e '.[test]'
40+ pip install codecov
41+
42+ - name : Run pytest
43+ run : pytest --cov=neuxml --cov-report=xml
44+
45+ - name : Upload test coverage to Codecov
46+ uses : codecov/codecov-action@v3
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ To run all unit tests::
2626 pytest
2727
2828 # for continuous integration
29- pytest --cov=./ --cov-report=xml
29+ pytest --cov=neuxml --cov-report=xml
3030
3131To run unit tests for a specific module, use syntax like this::
3232
Original file line number Diff line number Diff line change 2222 # 'logo': 'logo.png',
2323 "github_user" : "Princeton-CDH" ,
2424 "github_repo" : "neuxml" ,
25- # 'travis_button': True, # enable when we get travis-ci set up
2625 "description" : "Python library to read and write structured XML" ,
2726 # 'analytics_id':
2827}
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ dev = [
3232 " pytest>=4.6" ,
3333 " pytest-cov" ,
3434 " pytest-socket" ,
35- " tox" ,
3635 " requests" ,
3736 " pre-commit" ,
3837]
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments