From 9ef4dc58fa8f80b4e2dd64bcf7e799f2b2eb1e2f Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Wed, 8 Oct 2025 16:07:04 +0200 Subject: [PATCH] feat(github): push test/lint actions implemented --- .github/workflows/lint_front.yml | 17 ++++++++ .github/workflows/test_front.yml | 17 ++++++++ front/tsconfig.json | 73 ++++++++++++++------------------ 3 files changed, 65 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/lint_front.yml create mode 100644 .github/workflows/test_front.yml diff --git a/.github/workflows/lint_front.yml b/.github/workflows/lint_front.yml new file mode 100644 index 0000000..fa48b60 --- /dev/null +++ b/.github/workflows/lint_front.yml @@ -0,0 +1,17 @@ +name: Lint front projects + +on: + push: + branches: + - "feature/**" + - "bugfix/**" + +jobs: + next: + name: Next front lint + runs-on: ubuntu-latest + steps: + - name: Checkout into git repository + uses: actions/checkout@v4 + - name: Runs front tests + run: cd front && npx lint-staged -c ./.eslintrc.json -q diff --git a/.github/workflows/test_front.yml b/.github/workflows/test_front.yml new file mode 100644 index 0000000..51f92f3 --- /dev/null +++ b/.github/workflows/test_front.yml @@ -0,0 +1,17 @@ +name: Test front projects + +on: + push: + branches: + - "feature/**" + - "bugfix/**" + +jobs: + next: + name: Next front test + runs-on: ubuntu-latest + steps: + - name: Checkout into git repository + uses: actions/checkout@v4 + - name: Runs front tests + run: cd front && npm i && npm run test diff --git a/front/tsconfig.json b/front/tsconfig.json index 6b3831b..94a2689 100644 --- a/front/tsconfig.json +++ b/front/tsconfig.json @@ -1,45 +1,34 @@ { - "compilerOptions": { - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": [ - "./src/*" - ] + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + }, + "typeRoots": ["./node_modules/@types", "./src/modules/auth/types"] }, - "typeRoots": [ - "./node_modules/@types", - "./src/modules/auth/types" - ] - }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts", - "src/modules/**/*.d.ts", - "./jest.setup.ts" - ], - "exclude": [ - "node_modules" - ] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts", + "src/modules/**/*.d.ts", + "./jest.setup.ts" + ], + "exclude": ["node_modules"] }