mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2026-02-01 17:04:18 +01:00
Merge pull request #550 from hydrosquall/dev/migrate-tests-to-github-actions
[development] Migrate Testing/Linting Checks to Github Actions
This commit is contained in:
47
.github/workflows/python-package.yml
vendored
Normal file
47
.github/workflows/python-package.yml
vendored
Normal file
@@ -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
|
||||
27
.travis.yml
27
.travis.yml
@@ -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
|
||||
@@ -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
|
||||
-----------------------
|
||||
|
||||
@@ -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)
|
||||
--------------------------------
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user