diff --git a/.github/worflows/lint_python.yml b/.github/worflows/lint_python.yml new file mode 100644 index 0000000..8ed10c2 --- /dev/null +++ b/.github/worflows/lint_python.yml @@ -0,0 +1,30 @@ +name: lint_python +on: + pull_request: + push: + # branches: [master] +jobs: + lint_python: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] # [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.8] # [2.7, 3.5, 3.6, 3.7, 3.8, pypy3] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - run: pip install black codespell flake8 isort pytest + - run: black --check . || true + # - run: black --diff . || true + # - if: matrix.python-version >= 3.6 + # run: | + # pip install black + # black --check . || true + - run: codespell --quiet-level=2 || true # --ignore-words-list="" --skip="" + - run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + - run: isort --profile black --recursive . || true + - run: pip install -r requirements.txt || true + - run: pytest . || true