diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..33a82610 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,24 @@ +name: Linter +on: + pull_request: + branches: [ master ] + push: + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Linters + run: pip3 install flake8 isort black + - name: flake8 + run: flake8 *.py + - name: isort + run: isort -c -df *.py + - name: black + run: black --check --diff *.py diff --git a/.travis/script b/.travis/script deleted file mode 100755 index 28f829e3..00000000 --- a/.travis/script +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -ex - -flake8 *.py -isort -c -df *.py -black --check --diff *.py diff --git a/run.py b/run.py index cad1cff7..69b90858 100755 --- a/run.py +++ b/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 -import argparse import sys +import argparse from typing import List, Tuple import testcases @@ -33,9 +33,7 @@ def get_args(): default=False, help="turn on debug logs", ) - parser.add_argument( - "-s", "--server", help="server implementations (comma-separated)" - ) + parser.add_argument("-s", "--server", help="server implementations (comma-separated)") parser.add_argument( "-c", "--client", help="client implementations (comma-separated)" )