diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml new file mode 100644 index 0000000..718696b --- /dev/null +++ b/.github/workflows/pythonpackage.yml @@ -0,0 +1,29 @@ +name: Python package + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Lint with flake8 + run: | + make install_test format git-diff-check lint + - name: Test + run: | + make diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 0000000..d047cd9 --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,10 @@ +[settings] +line_length=79 +known_first_party=lml, pyexcel +known_third_party=nose +indent=' ' +multi_line_output=3 +length_sort=1 +default_section=FIRSTPARTY +no_lines_before=LOCALFOLDER +sections=FUTURE,STDLIB,FIRSTPARTY,THIRDPARTY,LOCALFOLDER diff --git a/.moban.d/custom_travis.yml.jj2 b/.moban.d/custom_travis.yml.jj2 index 73b434a..9a18ae8 100644 --- a/.moban.d/custom_travis.yml.jj2 +++ b/.moban.d/custom_travis.yml.jj2 @@ -1,9 +1,7 @@ {% extends "travis.yml.jj2" %} {%block extra_matrix %} -matrix: - include: - - python: 3.6 - env: MINREQ=1 +env: + - MINREQ=1 {%endblock%} {%block custom_python_versions%} python: diff --git a/.travis.yml b/.travis.yml index 1012eba..208ab50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,8 @@ python: - 3.8 - 3.7 - 3.6 -matrix: - include: - - python: 3.6 - env: MINREQ=1 +env: + - MINREQ=1 stages: - lint diff --git a/Makefile b/Makefile index 48ac0a6..23f6e23 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ all: test test: bash test.sh +install_test: + pip install -r tests/requirements.txt + document: sphinx-autogen -o docs/source/generated/ docs/source/*.rst sphinx-build -b html docs/source/ docs/build/ @@ -15,4 +18,6 @@ format: lint: bash lint.sh +git-diff-check: + git diff --exit-code