diff --git a/.github/workflows/ci-debian-macos.yml b/.github/workflows/ci-debian-macos.yml new file mode 100644 index 00000000..49a9ab99 --- /dev/null +++ b/.github/workflows/ci-debian-macos.yml @@ -0,0 +1,50 @@ +name: Test on MacOS and ubuntu + +on: [push, pull_request] + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + max-parallel: 4 + matrix: + os: [ubuntu-latest, macOS-latest] + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Install testing dependencies + run: | + pip install pytest + pip install pytest-cov + pip install hypothesis + pip install matplotlib>=3.0.2 + pip install black + pip install coverage + pip install coveralls + - name: Test with pytest + run: | + python setup.py develop + pytest --cov=nashpy tests/ + - name: Report coverage to coveralls (only on py3.8 and ubuntu) + if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest' + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: | + coveralls + - name: Check format (only on py3.8 and ubuntu) + if: matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest' + run: | + black -l 80 . --check + - name: Doctest + run: | + python doctests.py diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml new file mode 100644 index 00000000..34ee4f33 --- /dev/null +++ b/.github/workflows/ci-windows.yml @@ -0,0 +1,35 @@ +name: Test on Windows + +on: [push] + +jobs: + build: + + runs-on: windows-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Install testing dependencies + run: | + pip install pytest + pip install hypothesis + pip install matplotlib>=3.0.2 + - name: Test with pytest + run: | + python setup.py develop + pytest tests/ + - name: Doctest + run: | + python doctests.py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d8f6052c..00000000 --- a/.travis.yml +++ /dev/null @@ -1,42 +0,0 @@ -language: python -sudo: required -dist: xenial -python: - - 3.5 - - 3.6 - - 3.7 - -cache: - directories: - - $TRAVIS_BUILD_DIR/.hypothesis - -install: - - sudo apt-get update - # We do this conditionally because it saves us some downloading if the - # version is the same. - - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - - bash miniconda.sh -b -p $HOME/miniconda - - export PATH="$HOME/miniconda/bin:$PATH" - - hash -r - - conda config --set always_yes yes --set changeps1 no - - conda update -q conda - # Useful for debugging any issues with conda - - conda info -a - - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION scipy>=0.19.0 numpy>=1.15.4 matplotlib>=3.0.2 - - source activate test-environment - - pip install coverage - - pip install coveralls - - pip install hypothesis - - pip install pytest - - pip install pytest-cov - - if [[ "$TRAVIS_PYTHON_VERSION" == '3.6' ]]; then pip install black; fi - -script: - - python setup.py develop - - pytest --cov=nashpy tests/ - - coverage report -m - - if [[ "$TRAVIS_PYTHON_VERSION" == '3.6' ]]; then black -l 80 . --check; fi - - python doctests.py # Run doctests - -after_success: - - coveralls