diff --git a/.github/workflows/test-app-node-express.yml b/.github/workflows/test-app-node-express.yml index 4fd01563..56549214 100644 --- a/.github/workflows/test-app-node-express.yml +++ b/.github/workflows/test-app-node-express.yml @@ -24,7 +24,7 @@ jobs: with: filters: | app-node-express: - - 'packages/mern-sample-app/app-node-express/**' + - 'apps/app-node-express/**' - name: 🛠 Setup Git, PNPM and Node.js if: steps.changes.outputs.app-node-express == 'true' @@ -32,4 +32,4 @@ jobs: - name: 🚀 Run test if: steps.changes.outputs.app-node-express == 'true' - run: pnpm run app-node-express:test + run: pnpm --filter app-node-express test diff --git a/.github/workflows/test-app-vite-react.yml b/.github/workflows/test-app-vite-react.yml index 4a4a2fdb..875fbabb 100644 --- a/.github/workflows/test-app-vite-react.yml +++ b/.github/workflows/test-app-vite-react.yml @@ -24,7 +24,7 @@ jobs: with: filters: | app-vite-react: - - 'packages/mern-sample-app/app-vite-react/**' + - 'apps/app-vite-react/**' - name: 🛠 Setup Git, PNPM and Node.js if: steps.changes.outputs.app-vite-react == 'true' @@ -32,4 +32,4 @@ jobs: - name: 🚀 Run test if: steps.changes.outputs.app-vite-react == 'true' - run: pnpm run app-vite-react:test + run: pnpm --filter app-vite-react test diff --git a/.github/workflows/test-lib-api-client.yml b/.github/workflows/test-lib-api-client.yml index fb71a5c2..fec3e2ad 100644 --- a/.github/workflows/test-lib-api-client.yml +++ b/.github/workflows/test-lib-api-client.yml @@ -24,7 +24,7 @@ jobs: with: filters: | lib-api-client: - - 'packages/mern-sample-app/lib-api-client/**' + - 'packages/lib-api-client/**' - name: 🛠 Setup Git, PNPM and Node.js if: steps.changes.outputs.lib-api-client == 'true' @@ -32,4 +32,4 @@ jobs: - name: 🚀 Run test if: steps.changes.outputs.lib-api-client == 'true' - run: pnpm run lib-api-client:test + run: pnpm --filter lib-api-client test diff --git a/.github/workflows/test-lib-commons.yml b/.github/workflows/test-lib-commons.yml index c3dccb89..31faf414 100644 --- a/.github/workflows/test-lib-commons.yml +++ b/.github/workflows/test-lib-commons.yml @@ -24,7 +24,7 @@ jobs: with: filters: | lib-commons: - - 'packages/mern-sample-app/lib-commons/**' + - 'packages/lib-commons/**' - name: 🛠 Setup Git, PNPM and Node.js if: steps.changes.outputs.lib-commons == 'true' @@ -32,4 +32,4 @@ jobs: - name: 🚀 Run test if: steps.changes.outputs.lib-commons == 'true' - run: pnpm run lib-commons:test + run: pnpm --filter lib-commons test diff --git a/.github/workflows/test-lib-decorators.yml b/.github/workflows/test-lib-decorators.yml new file mode 100644 index 00000000..98211f8a --- /dev/null +++ b/.github/workflows/test-lib-decorators.yml @@ -0,0 +1,35 @@ +name: test-lib-decorators + +on: + push: + branches: + - "main" + pull_request: + branches: + - "**" + merge_group: + workflow_dispatch: + +jobs: + test-lib-decorators: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: ⚙️ Configure paths filter environment variable + uses: dorny/paths-filter@v3 + id: changes + with: + filters: | + lib-decorators: + - 'packages/lib-decorators/**' + + - name: 🛠 Setup Git, PNPM and Node.js + if: steps.changes.outputs.lib-decorators == 'true' + uses: ./.github/composite-actions/install + + - name: 🚀 Run test + if: steps.changes.outputs.lib-decorators == 'true' + run: pnpm --filter lib-decorators test diff --git a/.github/workflows/test-lib-mongodb.yml b/.github/workflows/test-lib-mongodb.yml new file mode 100644 index 00000000..8a7fecca --- /dev/null +++ b/.github/workflows/test-lib-mongodb.yml @@ -0,0 +1,35 @@ +name: test-lib-mongodb + +on: + push: + branches: + - "main" + pull_request: + branches: + - "**" + merge_group: + workflow_dispatch: + +jobs: + test-lib-mongodb: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: ⚙️ Configure paths filter environment variable + uses: dorny/paths-filter@v3 + id: changes + with: + filters: | + lib-mongodb: + - 'packages/lib-mongodb/**' + + - name: 🛠 Setup Git, PNPM and Node.js + if: steps.changes.outputs.lib-mongodb == 'true' + uses: ./.github/composite-actions/install + + - name: 🚀 Run test + if: steps.changes.outputs.lib-mongodb == 'true' + run: pnpm --filter lib-mongodb test diff --git a/package.json b/package.json index a85bc34b..92bee0fe 100644 --- a/package.json +++ b/package.json @@ -13,40 +13,25 @@ "engines": { "pnpm": ">=8.15.7" }, + "keywords": [ + "monorepo", + "starter", + "template", + "mern", + "railway", + "react", + "mongodb", + "express", + "node" + ], "scripts": { - "prepare": "npm run lib-commons:build && npm run lib-api-client:build", - "renameProjectLabels": "node renameProjectLabels.js", - "test": "npm run app-node-express:test && npm run app-vite-react:test && npm run lib-commons:test && npm run lib-api-client:test", - "build": "npm run lib-commons:build && npm run lib-api-client:build && npm run app-node-express:build && npm run app-vite-react:build", - "clean": "rm -rf docs && npm run app-node-express:clean && npm run app-vite-react:clean && npm run lib-commons:clean && npm run lib-api-client:clean", - "reinstall": "rm -rf node_modules packages/mern-sample-app/app-node-express/node_modules packages/mern-sample-app/app-vite-react/node_modules packages/mern-sample-app/lib-commons/node_modules packages/mern-sample-app/lib-api-client/node_modules && npx pnpm i", - "lint": "npm run app-node-express:lint && npm run app-vite-react:lint && npm run lib-commons:lint && npm run lib-api-client:lint", - "lint:fix": "npm run app-node-express:lint:fix && npm run app-vite-react:lint:fix && npm run lib-commons:lint:fix && npm run lib-api-client:lint:fix", + "test": "pnpm -r test", + "build": "pnpm -r build", + "clean": "pnpm -r clean", + "lint": "pnpm -r lint", + "lint:fix": "pnpm -r lint:fix", "writeTypedoc": "bash assets/sh/typedoc.sh", - "app-node-express:start": "npm run start --prefix app/app-node-express", - "app-node-express:dev": "npm run start --prefix app/app-node-express", - "app-node-express:test": "npm run test --prefix app/app-node-express", - "app-node-express:build": "npm run build --prefix app/app-node-express", - "app-node-express:clean": "npm run clean --prefix app/app-node-express", - "app-node-express:lint": "npm run lint --prefix app/app-node-express", - "app-node-express:lint:fix": "npm run lint:fix --prefix app/app-node-express", - "app-vite-react:start": "npm run start --prefix app/app-vite-react", - "app-vite-react:dev": "npm run dev --prefix app/app-vite-react", - "app-vite-react:test": "npm run test --prefix app/app-vite-react", - "app-vite-react:build": "npm run build --prefix app/app-vite-react", - "app-vite-react:clean": "npm run clean --prefix app/app-vite-react", - "app-vite-react:lint": "npm run lint --prefix app/app-vite-react", - "app-vite-react:lint:fix": "npm run lint:fix --prefix app/app-vite-react", - "lib-commons:lint": "npm run lint --prefix packages/lib-commons", - "lib-commons:lint:fix": "npm run lint:fix --prefix packages/lib-commons", - "lib-commons:build": "npm run build --prefix packages/lib-commons", - "lib-commons:test": "npm run test --prefix packages/lib-commons", - "lib-commons:clean": "npm run clean --prefix packages/lib-commons", - "lib-api-client:lint": "npm run lint --prefix packages/lib-api-client", - "lib-api-client:lint:fix": "npm run lint:fix --prefix packages/lib-api-client", - "lib-api-client:build": "npm run build --prefix packages/lib-api-client", - "lib-api-client:test": "npm run test --prefix packages/lib-api-client", - "lib-api-client:clean": "npm run clean --prefix packages/lib-api-client" + "renameProjectLabels": "node renameProjectLabels.js" }, "devDependencies": { "@nx/eslint": "20.1.2", @@ -69,16 +54,5 @@ "typescript": "^5.7.2", "vite-tsconfig-paths": "^5.1.3", "vitest": "^2.1.5" - }, - "keywords": [ - "monorepo", - "starter", - "template", - "mern", - "railway", - "react", - "mongodb", - "express", - "node" - ] + } }