diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..c93a23d --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,30 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +on: pull_request +jobs: + pre-commit: + runs-on: ubuntu-18.04 + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup python 3.6 + uses: actions/setup-python@v1 + with: + python-version: 3.6 + test-unit: + runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: ['3.6.x', '3.7.x'] + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: pip3 install -r requirements.txt && pip3 install codecov + - name: Run python unit tests + run: make test diff --git a/.github/workflows/pypipublish.yml b/.github/workflows/pypipublish.yml new file mode 100644 index 0000000..a0ddd06 --- /dev/null +++ b/.github/workflows/pypipublish.yml @@ -0,0 +1,29 @@ + +name: Build and Deploy +on: + push: + branches: + - master + tags: + - '*' +jobs: + build-and-publish-python-module: + name: Build and publish python module to pypi + runs-on: ubuntu-18.04 + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup python 3.6 + uses: actions/setup-python@v1 + with: + python-version: 3.6 + - name: Add wheel dependency + run: pip install wheel + - name: Generate dist + run: python setup.py sdist bdist_wheel + - name: Publish to PyPI + if: startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3ae60bb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -dist: xenial -language: python -python: 3.7 -install: -- pip3 install -r requirements.txt -- pip3 install codecov -- python3 setup.py install -script: -- make test -after_success: -- codecov -deploy: - provider: pypi - user: amundsen-dev - distributions: sdist bdist_wheel - skip_existing: true - on: - tags: true - repo: amundsen-io/amundsencommon - password: - secure: NXVfA0RWsk0NAfLhwKIi50UQovOmanlR2KiIUJm1dhQFkkrCIbMIJ0tXSBCOmxJEzKRCObkei4IF9TFBYndE2NkvuuuZHPIQHgXjDr7brIMAeTD7pdJwgzBfLeFbBvIGX/RqZTbkulpQS+rtgr4XpnWELJpnDQlaoCkP2VCqorchhYm34fBahQOHHnsEG2o3ZxU2HXaLTNaW1Q9htrBM65t7TYi/kE1dVhGdh65/M2EP0owed5T5rQNs8jN+QTCuLdqKBsg49zyZUHs46ffs7o67bwx0BSfF6WLdFa4s3sTEDVn0frkgOeJfDDZiTPOYnQSLACskzLiBaG7sILU5hlD3ME45IT8W1Unryti5uS5LCcv01PvpEMp86ZLJGkQFOmTilLXvz+o20ssDWCPUaXxqLNk8iu4C+nSbq52b7EvhYwYFn8eruiloBuG9QFS8YE8UEYxE5t7KORMt2+xz8AiAWr+2EkVkZOTocSXnJavjW1Ihr0U9Tn+hkGFGD5SMfO2G7STYmd1wHEzCf/AOeDrDi3IH2KLrd6tvK7ZRfT6AbIYMsdvFxfCeiVlrt47n3XpQ9KTepXgMGDmdzu7YYmqRMWg4CirOiVr9zh6uPrtXNv5nt38S2Uzie1TtOyzJlWpKLQG7jzyNW9SIK4oU7Fwvi9V0jQ8r7pW5xbZcdEQ=