From 12676668e664f51899d5b007461b976a5f340cc2 Mon Sep 17 00:00:00 2001 From: tosta Date: Mon, 16 Oct 2023 20:44:41 +0200 Subject: [PATCH 1/2] eslint workflow added and contine-on-error added --- .github/workflows/pr_ci_backend.yaml | 4 +++- .github/workflows/pr_ci_frontend.yaml | 15 +++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_ci_backend.yaml b/.github/workflows/pr_ci_backend.yaml index a3446fd69..4872a4c28 100644 --- a/.github/workflows/pr_ci_backend.yaml +++ b/.github/workflows/pr_ci_backend.yaml @@ -11,7 +11,7 @@ on: jobs: backend: - name: Run PR Backend Formatting Check + name: Run PR Backend Check runs-on: ubuntu-latest steps: - name: Checkout @@ -32,9 +32,11 @@ jobs: with: options: --check --verbose --exclude "migrations/" src: ./backend + continue-on-error: true - name: Run ruff - Linting and import sorting check run: ruff ./backend + continue-on-error: true - name: Run mypy - Static Type Checking run: mypy ./backend --config-file ./backend/mypy.ini diff --git a/.github/workflows/pr_ci_frontend.yaml b/.github/workflows/pr_ci_frontend.yaml index 665ec9a91..468220ac5 100644 --- a/.github/workflows/pr_ci_frontend.yaml +++ b/.github/workflows/pr_ci_frontend.yaml @@ -11,16 +11,16 @@ on: jobs: frontend: - name: Run PR Frontend Formatting Check + name: Run PR Frontend Check runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - - name: Setup Node + - name: Setup Node environment uses: actions/setup-node@v3 - - name: Yarn Install + - name: Install Yarn uses: borales/actions-yarn@v4 with: cmd: install @@ -29,7 +29,7 @@ jobs: - name: Install Prettier run: yarn add prettier - - name: Run Prettier + - name: Run Prettier - Formatting check working-directory: ./frontend run: | yarn prettier . --check --config ../.prettierrc --ignore-path ../.prettierignore @@ -40,3 +40,10 @@ jobs: with: cmd: nuxi typecheck dir: "frontend" + continue-on-error: true + + - name: Run eslint - Linting + uses: borales/actions-yarn@v4 + with: + cmd: eslint . --ext .js,.vue + dir: "frontend" From 5d041aae81a98e4b05522e4e0d8721edfefb2097 Mon Sep 17 00:00:00 2001 From: tosta Date: Mon, 16 Oct 2023 22:09:36 +0200 Subject: [PATCH 2/2] fix ruff import sorting errors --- backend/authentication/serializers.py | 3 ++- backend/content/serializers.py | 3 ++- backend/entities/serializers.py | 5 +++-- backend/events/serializers.py | 5 +++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/backend/authentication/serializers.py b/backend/authentication/serializers.py index f20984a3d..2a1aab41f 100644 --- a/backend/authentication/serializers.py +++ b/backend/authentication/serializers.py @@ -1,9 +1,10 @@ import re from typing import Any, Dict, Union -from content.models import Resource, Task, Topic from django.utils.translation import gettext as _ from rest_framework import serializers + +from content.models import Resource, Task, Topic from utils.utils import ( validate_creation_and_deletion_dates, validate_empty, diff --git a/backend/content/serializers.py b/backend/content/serializers.py index 5242474b7..115725e7b 100644 --- a/backend/content/serializers.py +++ b/backend/content/serializers.py @@ -2,8 +2,9 @@ from typing import Any, Dict, Union from django.utils.translation import gettext as _ -from events.models import Format from rest_framework import serializers + +from events.models import Format from utils.utils import ( validate_creation_and_deletion_dates, validate_creation_and_deprecation_dates, diff --git a/backend/entities/serializers.py b/backend/entities/serializers.py index 7060b0cc0..68f74afcd 100644 --- a/backend/entities/serializers.py +++ b/backend/entities/serializers.py @@ -1,10 +1,11 @@ from typing import Dict, Union +from django.utils.translation import gettext as _ +from rest_framework import serializers + from authentication.models import User from content.models import Resource, Task, Topic -from django.utils.translation import gettext as _ from events.models import Event -from rest_framework import serializers from utils.utils import ( validate_creation_and_deletion_dates, validate_empty, diff --git a/backend/events/serializers.py b/backend/events/serializers.py index e96272823..da3169674 100644 --- a/backend/events/serializers.py +++ b/backend/events/serializers.py @@ -1,9 +1,10 @@ from typing import Dict, Union -from authentication.models import User -from content.models import Resource, Task, Topic from django.utils.translation import gettext as _ from rest_framework import serializers + +from authentication.models import User +from content.models import Resource, Task, Topic from utils.utils import ( validate_creation_and_deletion_dates, validate_creation_and_deprecation_dates,