From d019a2717cb236b8a6d1ab2cbdb4f401eb871c5d Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Tue, 16 Feb 2021 20:12:16 +0100 Subject: [PATCH] adding gh actions --- .github/workflows/pypi-release.yml | 27 +++++++++++++++++++++++++++ .github/workflows/testing.yml | 22 ++++++++++++++++++++++ .travis.yml | 13 ------------- 3 files changed, 49 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/pypi-release.yml create mode 100644 .github/workflows/testing.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml new file mode 100644 index 0000000..0536b79 --- /dev/null +++ b/.github/workflows/pypi-release.yml @@ -0,0 +1,27 @@ +name: Release to PyPI +on: + release: + types: [created] +jobs: + pypi_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install Tools + run: | + sudo apt update + sudo apt -y install python3-pypandoc pandoc + python -m pip install --upgrade pip + pip install setuptools wheel twine pypandoc + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Build and Publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 0000000..85eb540 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,22 @@ +name: tests +on: [push] +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.4, 3.5, 3.6, 3.7, 3.8] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r tests-requirements.txt + pip install -r requirements.txt + - name: Run tests + run: | + ./tests.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6687c22..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: python -python: - - "3.4" - - "3.5" - - "3.6" -install: - - "pip install pip --upgrade" - - "pip install -r tests-requirements.txt" - - "pip install -r requirements.txt" -script: - ./tests.sh -after_success: - coveralls