From 8a959a6e9749d88ac841b0261537455b06343c80 Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sat, 12 Dec 2020 19:43:41 -0500 Subject: [PATCH 1/2] Create python-package.yml --- .github/workflows/python-package.yml | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..abcd82d --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,47 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python test and lint + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['2.7', '3.6', '3.7'] + WITH_PANDAS: [false, true] + + 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 + env: + WITH_PANDAS: ${{ matrix.WITH_PANDAS }} + run: | + python -m pip install --upgrade pip + python setup.py develop + python -m pip install flake8 pytest-cov codecov vcrpy + tools/install_pandas.sh + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Run unit tests + env: + TIINGO_API_KEY: 0000000000000000000000000000000000000000 + run: | + py.test --cov=./tiingo + - name: Run code coverage + run: codecov From 8a62acc549cb21bb5c9587a2e7a34e6ebd044fd5 Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Sat, 12 Dec 2020 19:54:31 -0500 Subject: [PATCH 2/2] Remove traces of Travis CI from Tiingo documentation/contributing guidelines --- .travis.yml | 27 --------------------------- CONTRIBUTING.rst | 5 +---- HISTORY.rst | 1 + README.rst | 3 --- docs/index.rst | 3 --- 5 files changed, 2 insertions(+), 37 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7c3d6df..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -install: - - python setup.py develop - - pip install -U pytest-cov codecov vcrpy - - tools/install_pandas.sh - # - pip install -U tox-travis pytest - -language: python -python: - - 3.7 - - 3.6 - - 2.7 - -cache: pip - -env: - - WITH_PANDAS=false - - WITH_PANDAS=true - -script: - - export TIINGO_API_KEY=0000000000000000000000000000000000000000 - - py.test --cov=./tiingo - -matrix: - fast_finish: true - -after_success: -- codecov diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 3bfc3e8..97c5c21 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -101,10 +101,7 @@ Before you submit a pull request, check that it meets these guidelines: 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. -3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check - https://travis-ci.org/hydrosquall/tiingo-python/pull_requests - and make sure that the tests pass for all supported Python versions. - +3. The pull request should work for Python 2.7, 3.6, and 3.7. These will be checked for you when you open your PR via Github Action checks. Release Procedure ----------------------- diff --git a/HISTORY.rst b/HISTORY.rst index 07d0cf2..4bfea51 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,7 @@ History 0.14.0 (2020-12-XX - Unreleased) -------------------------------- * Feature (Name #Number) +* Development: Run tests in Github Actions instead of Travis.org 0.13.0 (2020-12-12) -------------------------------- diff --git a/README.rst b/README.rst index 355d65a..be657a5 100644 --- a/README.rst +++ b/README.rst @@ -9,9 +9,6 @@ Tiingo Python :target: https://codecov.io/gh/hydrosquall/tiingo-python :alt: Coverage -.. image:: https://img.shields.io/travis/hydrosquall/tiingo-python.svg?maxAge=600 - :target: https://travis-ci.org/hydrosquall/tiingo-python - .. image:: https://readthedocs.org/projects/tiingo-python/badge/?version=latest&maxAge=600 :target: https://tiingo-python.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status diff --git a/docs/index.rst b/docs/index.rst index 41390d4..b6fcabd 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,9 +4,6 @@ Welcome to Tiingo Python's documentation! .. image:: https://img.shields.io/pypi/v/tiingo.svg?maxAge=600 :target: https://pypi.python.org/pypi/tiingo -.. image:: https://img.shields.io/travis/hydrosquall/tiingo-python.svg?maxAge=600 - :target: https://travis-ci.org/hydrosquall/tiingo-python - .. image:: https://readthedocs.org/projects/tiingo-python/badge/?version=latest&maxAge=600 :target: https://tiingo-python.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status