Explorar el Código

feat: replace flake8, mypy, black, isort with ruff in partial-tests action

trgiangdo hace 1 año
padre
commit
c7695532a2
Se han modificado 1 ficheros con 18 adiciones y 15 borrados
  1. 18 15
      .github/workflows/partial-tests.yml

+ 18 - 15
.github/workflows/partial-tests.yml

@@ -10,17 +10,20 @@ jobs:
   linter:
     runs-on: ubuntu-latest
     steps:
-      # replace for Ruff in the future
       - uses: actions/checkout@v4
+
       - uses: ricardochaves/python-lint@v1.4.0
         with:
-          use-pylint: false
+          use-black: false
+          use-flake8: false
           use-isort: false
-          use-mypy: false
-          extra-black-options: "--line-length=120 --diff"
-          extra-pycodestyle-options: "--max-line-length=120  --exclude=tests/gui --ignore=E121,E123,E126,E226,E24,E704,W503,W504,E203"
+          use-pycodestyle: false
+          use-pylint: false
+          use-mypy: false  # TODO: re-enable mypy
           extra-mypy-options: "--ignore-missing-imports --implicit-optional --no-namespace-packages --exclude (taipy/templates/|generate_pyi.py|tools) --follow-imports skip"
-          extra-isort-options: "--line-length=120 --force-grid-wrap=10 --multi-line=VERTICAL_HANGING_INDENT --trailing-comma"
+
+      - uses: chartboost/ruff-action@v1
+
   tests:
     needs: linter
     timeout-minutes: 40
@@ -81,32 +84,32 @@ jobs:
 
       - name: Pytest CLI
         if: steps.changes.outputs.cli == 'true'
-        run: pipenv run pytest  tests/cli
+        run: pipenv run pytest tests/cli
 
       - name: Pytest Config
         if: steps.changes.outputs.config == 'true'
-        run: pipenv run pytest  tests/config
+        run: pipenv run pytest tests/config
 
       - name: Pytest Core
         if: steps.changes.outputs.core == 'true'
-        run: pipenv run pytest  tests/core
+        run: pipenv run pytest tests/core
 
       - name: Pytest GUI
         if: steps.changes.outputs.gui == 'true'
-        run: pipenv run pytest  tests/gui
+        run: pipenv run pytest tests/gui
 
       - name: Pytest GUI Core
         if: steps.changes.outputs.gui-core == 'true'
-        run: pipenv run pytest  tests/gui_core
+        run: pipenv run pytest tests/gui_core
 
       - name: Pytest Logger
         if: steps.changes.outputs.logger == 'true'
-        run: pipenv run pytest  tests/logger
+        run: pipenv run pytest tests/logger
 
       - name: Pytest Rest
         if: steps.changes.outputs.rest == 'true'
-        run: pipenv run pytest  tests/rest
+        run: pipenv run pytest tests/rest
 
-      - name: Pytest Rest
+      - name: Pytest Template
         if: steps.changes.outputs.templates == 'true'
-        run: pipenv run pytest  tests/templates
+        run: pipenv run pytest tests/templates