Skip to content

Commit

Permalink
test lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ywkure committed Feb 17, 2021
1 parent e3ff90a commit a5824c4
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 61 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/main.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/superlinter.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: tests

on: push

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Lint
run: |
black ./ --check
flake8
# test:
# needs: lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: 3.8
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install .[dev]
# - name: Test
# run: pytest
# - name: Coveralls
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# pip install coveralls
# coveralls --service=github
# deploy:
# needs: test
# runs-on: ubuntu-latest
# if: contains(github.ref, 'tags')
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python
# uses: actions/setup-python@v1
# with:
# python-version: "3.x"
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -U setuptools setuptools_scm wheel twine
# - name: Build and publish
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
# run: |
# git tag
# python setup.py sdist bdist_wheel
# twine upload dist/*
10 changes: 10 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sphinx
sphinx_rtd_theme
pydoc-markdown
pytest-cov
pytest
gitpython
coverage
pre-commit
black
flake8
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
if len(stripped) > 0:
requirements.append(stripped)

with open("requirements_dev.txt") as f:
requirements_dev = f.read().splitlines()

setup_requirements = ['pytest-runner', ]

test_requirements = ['pytest>=3', ]
Expand All @@ -39,6 +42,7 @@
'Programming Language :: Python :: 3.8',
],
description="hdf5/split-dataset file reader for napari",
extras_require=dict(dev=requirements_dev),
install_requires=requirements,
license="GNU General Public License v3",
# long_description=readme + '\n\n' + history,
Expand Down

0 comments on commit a5824c4

Please sign in to comment.