diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91d39213..9ed03f73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,4 +68,4 @@ jobs: DBUSER: root DBPASSWORD: DBHOST: 127.0.0.1 - DBPORT: $ \ No newline at end of file + DBPORT: $ diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml new file mode 100644 index 00000000..934abbcb --- /dev/null +++ b/.github/workflows/pep8.yml @@ -0,0 +1,31 @@ +name: PEP8 Style Checker + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + name: Test PEP8 Style + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v27 + + - name: Setup pycodestyle + run: pip install pycodestyle + + - name: Check style + run: | + for file in ${{ steps.changed-files.outputs.all_changed_files }}; + do if [[ $file == *.py ]]; + then pycodestyle --first $file; + fi; + done