From 7993e71528704f849d703951ffa66267c2662f2c Mon Sep 17 00:00:00 2001 From: MacPingu Date: Fri, 29 Jan 2021 13:34:58 +0100 Subject: [PATCH] Add GitHub actions ci (#570) * added initial ci workflow * added coveralls * skip travis --- .github/workflows/main.yml | 42 ++++++++++++++++++++++++++++ .travis.yml | 57 -------------------------------------- requirements-dev.txt | 1 + 3 files changed, 43 insertions(+), 57 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..7f25bda6b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,42 @@ +name: build ⚙️ + +on: [ push, pull_request ] + +jobs: + main: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_SERVICE_NAME: github + steps: + - uses: actions/checkout@v2 + - name: Install packages + run: | + sudo apt-get -y install gdal-bin libgdal-dev libnetcdf-dev libhdf5-dev + - uses: actions/setup-python@v2 + name: Setup Python ${{ matrix.python-version }} + with: + python-version: ${{ matrix.python-version }} + - name: Install requirements 📦 + run: | + pip3 install pip --upgrade + pip3 install -r requirements.txt + pip3 install -r requirements-dev.txt + pip3 install -r requirements-extra.txt + pip3 install -r requirements-gdal.txt + - name: run tests ⚙️ + run: python3 -m unittest tests + - name: run coveralls ⚙️ + run: coveralls + if: matrix.python-version == 3.6 + - name: build docs 🏗️ + run: | + pip3 install -e . + cd docs && make html + if: matrix.python-version == 3.6 + - name: run flake8 ⚙️ + run: flake8 pywps + if: matrix.python-version == 3.6 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 20d5aae5f..000000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -language: python - -# sudo: required -os: linux -dist: xenial - -python: - - "3.6" - -git: - submodules: false - -addons: - apt: - sources: - - sourceline: 'ppa:ubuntugis/ppa' - packages: - - libnetcdf-dev - - libhdf5-dev - - gdal-bin - - libgdal-dev - - devscripts - - fakeroot - - debhelper - - python-setuptools - -# Handle Git submodules yourself -git: - submodules: false - -install: - - pip install pip --upgrade - - pip install -r requirements.txt - - pip install -r requirements-gdal.txt - - pip install -r requirements-extra.txt - - pip install -r requirements-dev.txt - - pip install coveralls - -script: - - python -m unittest tests - - coverage run --source=pywps -m unittest tests - - flake8 pywps/ - -after_success: - - coveralls - - python setup.py sdist bdist_wheel --universal - - debuild -b -uc -us - -# whitelist -# branches: -# only: -# - master - -# notifications: -# irc: -# channels: -# - "irc.freenode.org#geopython" diff --git a/requirements-dev.txt b/requirements-dev.txt index b236394d8..1c55bef67 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ coverage +coveralls flake8 flufl.enum pylint