TheHamkerCat hace 5 años
padre
commit
8d9f3b6999
Se han modificado 1 ficheros con 38 adiciones y 0 borrados
  1. 38 0
      .github/workflows/main.yml

+ 38 - 0
.github/workflows/main.yml

@@ -0,0 +1,38 @@
+name: PyLint
+
+on:
+  push:
+    branches: [ master ]
+  workflow_dispatch:
+
+jobs:
+  PEP8:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Setup Python
+        uses: actions/setup-python@v1
+        with:
+          python-version: 3.9
+      - name: Install Python lint libraries
+        run: |
+          pip3 install autoflake isort black
+      - name: Remove unused imports and variables
+        run: |
+          autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports .
+      - name: lint with isort
+        run: |
+          isort .
+      - name: lint with black
+        run: |
+          black .
+      # commit changes
+      - uses: stefanzweifel/git-auto-commit-action@v4
+        with:
+          commit_message: '[AUTO] Code-Format'
+          commit_options: '--no-verify'
+          repository: .
+          commit_user_name: TheHamkerCat
+          commit_user_email: thehamkercat@gmail.com
+          commit_author: TheHamkerCat <thehamkercat@gmail.com>