diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..fead18c --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,29 @@ +# For more information see: https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions + +name: Continuous Integration + +on: + pull_request: + branches: ['*'] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: yarn + - run: yarn prettier:check + - run: yarn test:coverage + - run: yarn build diff --git a/jest.config.js b/jest.config.js index 694c0f3..cd08c77 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,16 +1,11 @@ const nextJest = require('next/jest'); -const createJestConfig = nextJest({ - dir: './', -}); +const createJestConfig = nextJest({ dir: './' }); const customJestConfig = { setupFilesAfterEnv: ['/jest.setup.js'], moduleDirectories: ['node_modules', '/'], testEnvironment: 'jest-environment-jsdom', - testEnvironmentOptions: { - customExportConditions: [''], - }, }; module.exports = createJestConfig(customJestConfig); diff --git a/package.json b/package.json index e634aa3..86bce38 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "volta": { - "node": "18.16.0", + "node": "18.20.8", "yarn": "1.22.19" }, "scripts": { @@ -13,6 +13,8 @@ "build:production": "cp ./env/.env.production .env && next build", "start": "next start", "test": "jest --watch", + "test:coverage": "jest --coverage", + "build": "next build", "lint:check": "next lint", "lint:fix": "next lint --fix", "build:staging": "cp ./env/.env.staging .env && next build", @@ -31,8 +33,7 @@ "@types/node": "22.5.0", "@types/react": "18.3.4", "@types/react-dom": "18.3.0", - "@types/react-toastify": "^4.1.0", - "eslint": "9.9.0", + "eslint": "^8.57.0", "eslint-config-next": "14.2.6", "framer-motion": "^11.3.29", "module-alias": "^2.2.3", @@ -47,18 +48,25 @@ "whatwg-fetch": "^3.6.20" }, "devDependencies": { - "@testing-library/dom": "^10.4.0", - "@testing-library/jest-dom": "^6.4.8", - "@testing-library/react": "^16.0.0", - "@testing-library/user-event": "^14.5.2", - "autoprefixer": "^10.4.20", + "@testing-library/dom": "^8.19.0", + "@testing-library/jest-dom": "^5.16.5", + "@testing-library/react": "^13.4.0", + "@testing-library/user-event": "^14.4.3", + "@types/jest": "^29.5.14", + "autoprefixer": "^10.4.13", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "local-ssl-proxy": "^2.0.5", - "msw": "^2.4.1", + "msw": "^1.3.2", "npm-run-all": "^4.1.5", "postcss": "^8.4.41", "prettier": "^3.3.3", "tailwindcss": "^3.4.10" + }, + "resolutions": { + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0", + "mute-stream": "^1.0.0" } } diff --git a/src/components/Layout/Navbar/NavbarDesktop.tsx b/src/components/Layout/Navbar/NavbarDesktop.tsx index 5bd4bab..31d071f 100644 --- a/src/components/Layout/Navbar/NavbarDesktop.tsx +++ b/src/components/Layout/Navbar/NavbarDesktop.tsx @@ -24,7 +24,7 @@ const NavbarDesktop: FC = ({ )); return ( -