diff --git a/.github/workflows/commit-ofxtools.yml b/.github/workflows/commit-ofxtools.yml index 02722e2..e32ab22 100644 --- a/.github/workflows/commit-ofxtools.yml +++ b/.github/workflows/commit-ofxtools.yml @@ -15,9 +15,9 @@ jobs: python-version: [3.8, 3.9, "3.10", "3.11"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} # - name: Cache pip @@ -35,5 +35,10 @@ jobs: run: black --check . - name: Static analysis with mypy run: mypy ofxtools tests - - name: Test with nose - run: nose2 -s tests --verbose --with-coverage --fail-fast --output-buffer + - name: Run tests + run: pytest --cov-report lcov:coverage.lcov --cov=ofxtools tests/ + - run: find . + - name: Coveralls + uses: coverallsapp/github-action@v1 + with: + path-to-lcov: coverage.lcov diff --git a/Makefile b/Makefile index 1102fff..1ee28f6 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ test: black --check . mypy ofxtools mypy tests - python `which nose2` -s tests --verbose --with-coverage --fail-fast --output-buffer + python `which pytest` --cov=ofxtools tests/ clean: find . -name "*.py[co]" -o -name __pycache__ -exec rm -rf {} +; diff --git a/docs/contributing.rst b/docs/contributing.rst index db1a421..cc0c845 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -9,7 +9,7 @@ Make sure your changes haven't broken anything by running the tests: .. code:: bash - python nose2 -s tests --verbose --with-coverage --fail-fast --output-buffer + python pytest --cov=ofxtools tests/ Or even better, use ``make``: diff --git a/requirements-development.txt b/requirements-development.txt index 9d3f711..bff8b37 100644 --- a/requirements-development.txt +++ b/requirements-development.txt @@ -6,7 +6,8 @@ requests # test running -nose2 +pytest +pytest-cov coverage pylint ipdb diff --git a/setup.cfg b/setup.cfg index cd27a4a..2bcd70e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,9 +1,2 @@ -[nose2] -verbosity=2 -detailed-errors = 1 -with-coverage = 1 -nocapture = 1 -cover-package = ofxtools - [flake8] max-line-length = 88