diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..1db9dff --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,35 @@ +name: zxtools tests + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + python-version: [3.9, 3.12, 3.13] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools pytest pytest-cov mock + pip install -e . + - name: Run tests + run: | + pytest --cov=zxtools --cov-report=term-missing + - name: Upload coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) + if: success() diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3c46765..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: python -python: - - "3.4" - - "3.5" - - "3.6" - - "3.7" - - "3.8" - - "3.9" - - "nightly" -# command to install dependencies -install: - # Coveralls 4.0 doesn't support Python 3.2 - - if [ "$TRAVIS_PYTHON_VERSION" == "3.2" ]; then travis_retry pip install coverage==3.7.1; fi - - if [ "$TRAVIS_PYTHON_VERSION" != "3.2" ]; then travis_retry pip install coverage; fi - -# command to run tests -script: - - "make test" - - "make coverage" - -after_success: - - "bash <(curl -s https://codecov.io/bash)" diff --git a/Makefile b/Makefile index 59b74e6..ba00028 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,8 @@ clean: distclean: clean coverage: - coverage run --source zxtools setup.py test - coverage report -m --fail-under=80 + pytest --cov=zxtools --cov-report=term-missing +# coverage report -m --fail-under=80 lint: pylint zxtools -f parseable -r n diff --git a/README.rst b/README.rst index 9e9d27f..e012345 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,9 @@ Tools to manipulate ZX Spectrum files ===================================== -.. image:: https://travis-ci.com/codeatcpp/zxtools.svg?branch=master - :target: https://travis-ci.com/codeatcpp/zxtools + +.. image:: https://github.com/jia3ep/zxtools/actions/workflows/python-package.yml/badge.svg + :target: https://github.com/jia3ep/zxtools/actions/workflows .. image:: https://codecov.io/gh/codeatcpp/zxtools/branch/master/graph/badge.svg :target: https://codecov.io/gh/codeatcpp/zxtools diff --git a/setup.py b/setup.py index da0e04c..2140334 100755 --- a/setup.py +++ b/setup.py @@ -30,11 +30,9 @@ url='http://www.codeatcpp.com/', license='BSD-3-Clause', packages=find_packages(exclude=('test', 'docs')), - tests_require=['mock'], extras_require={ 'test': dev_requires, }, - test_suite='test', classifiers=[ 'Development Status :: 4 - Beta', 'Operating System :: OS Independent',