diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 00000000..eb8aa3c7 --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,43 @@ +name: Code Style +on: [ push, pull_request ] + +jobs: + isort: + name: isort + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Install Dependencies + run: pip3 install isort + - name: Run isort + run: 'isort --check' + pycodestyle1: + name: pycodestyle (everything but tests) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Install Dependencies + run: pip3 install pycodestyle + - name: Run pycodestyle + run: 'pycodestyle --ignore=E402,E501 --exclude=voctocore/tests,doc,example-scripts .' + pycodestyle2: + name: pycodestyle (tests only) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Install Dependencies + run: pip3 install pycodestyle + - name: Run pycodestyle + run: 'pycodestyle --ignore=E501 voctocore/tests' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9b66d429..00000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: python -python: - - 3.5 - -before_install: - - pip install pycodestyle mock - -script: - - ./check_pep8.sh - - ./voctocore/test.sh diff --git a/check_pep8.sh b/check_pep8.sh deleted file mode 100755 index 78b84c16..00000000 --- a/check_pep8.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -set -e - -# ignore import-not-at-top (required by gi) -pycodestyle --ignore=E402,E501 --exclude=voctocore/tests,doc,example-scripts . - -# ignore long lines (prefer explanatory test-names) -pycodestyle --ignore=E501 voctocore/tests