Skip to content

Commit

Permalink
[ci] Bump nose to nose2 and adapt coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nrybowski committed Jan 6, 2025
1 parent 1de114d commit f05bc91
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[run]
branch = True

[report]
show_missing = True
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get install -y libtidy5deb1 libzmq3-dev
pip3 install nose==1.3.7 selenium==3.141.0 coverage pyvirtualdisplay pytest
pip3 install coverage==7.6.9 pytest==8.0.0 virtualenv==20.25.0 setuptools==69.1.0\
setuptools-scm==8.0.4
pip install setuptools==69.1.0 setuptools-scm==8.0.4
# pip3 install nose==1.3.7 selenium==3.141.0 coverage pyvirtualdisplay pytest
# pip3 install coverage==7.6.9 pytest==8.0.0 virtualenv==20.25.0 setuptools==69.1.0\
# setuptools-scm==8.0.4
- name: Start services
run: |
Expand All @@ -49,12 +50,14 @@ jobs:
- name: Install INGInious
run: |
pip3 install .
pip3 install .[test]
- name: Launch nose tests
run: nosetests -v --with-coverage --cover-package=inginious --cover-branches --cover-html -I "^test_"
run: nose2

- name: Launch pytest tests
run: coverage run --branch -m pytest -v
if: always()
run: coverage run -a --branch -m pytest -v

- name: Generate coverage report
# Launch even if one of the two test jobs fails
Expand Down
7 changes: 7 additions & 0 deletions nose2.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[unittest]
test-file-pattern=Test*.py

[coverage]
always-on = True
coverage-combine= True
coverage-report = term-missing xml
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@

test_requires = [
"selenium == 3.141.0",
"nose",
"pyvirtualdisplay"
"nose2[coverage_plugin]==0.15.1",
"pytest == 8.3.4",
"pyvirtualdisplay",
"coverage == 7.6.9"
]

doc_requires = [
Expand Down

0 comments on commit f05bc91

Please sign in to comment.