diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 00000000000..0b01f126e21 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,35 @@ +name: Quality + +on: + push: + branches: ['main'] + pull_request: + types: [opened, synchronize] + +jobs: + quality: + name: Quality checks + timeout-minutes: 15 + runs-on: ubuntu-latest + # To use Remote Caching, uncomment the next lines and follow the steps below. + # env: + # TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + # TURBO_TEAM: ${{ vars.TURBO_TEAM }} + + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Setup Node.js environment + uses: actions/setup-node@v3 + + - name: Install global turbo + run: yarn global add turbo + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Run quality checks + run: turbo run lint check-types diff --git a/.gitignore b/.gitignore index 659edc841ea..06128c0df0d 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ exceptions.log error.log combined.log /tools/output +tsconfig.tsbuildinfo # System Files .DS_Store @@ -53,4 +54,7 @@ Thumbs.db migrations.json # Shouldn't happen, but backup since we have a script that generates these locally -*.pem \ No newline at end of file +*.pem + +# Turborepo +.turbo diff --git a/apps/client/package.json b/apps/client/package.json new file mode 100644 index 00000000000..84fd4b26171 --- /dev/null +++ b/apps/client/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe/client-app", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + } +} diff --git a/apps/e2e/package.json b/apps/e2e/package.json new file mode 100644 index 00000000000..3503519f75b --- /dev/null +++ b/apps/e2e/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe/e2e-app", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + } +} diff --git a/apps/server/package.json b/apps/server/package.json new file mode 100644 index 00000000000..b2ed70c932b --- /dev/null +++ b/apps/server/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe/server-app", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty -p tsconfig.app.json" + } +} diff --git a/apps/workers/package.json b/apps/workers/package.json new file mode 100644 index 00000000000..e021752eaf2 --- /dev/null +++ b/apps/workers/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe/workers-app", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty -p tsconfig.app.json" + } +} diff --git a/libs/client/features/package.json b/libs/client/features/package.json new file mode 100644 index 00000000000..857f86d4694 --- /dev/null +++ b/libs/client/features/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe/client-features-lib", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + } +} diff --git a/libs/client/shared/package.json b/libs/client/shared/package.json new file mode 100644 index 00000000000..d493875e253 --- /dev/null +++ b/libs/client/shared/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe/client-shared-lib", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + } +} diff --git a/libs/design-system/package.json b/libs/design-system/package.json index 0c5756882c2..cac9eff08e9 100644 --- a/libs/design-system/package.json +++ b/libs/design-system/package.json @@ -1,6 +1,10 @@ { "name": "@maybe-finance/design-system", "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + }, "nx": { "targets": { "build": { diff --git a/libs/finicity-api/package.json b/libs/finicity-api/package.json new file mode 100644 index 00000000000..9941a418af4 --- /dev/null +++ b/libs/finicity-api/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe-finance/finicity-api", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + } +} diff --git a/libs/server/features/package.json b/libs/server/features/package.json new file mode 100644 index 00000000000..de4321fba7d --- /dev/null +++ b/libs/server/features/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe-finance/server-features-lib", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + } +} diff --git a/libs/server/shared/package.json b/libs/server/shared/package.json new file mode 100644 index 00000000000..fb221463574 --- /dev/null +++ b/libs/server/shared/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe-finance/server-shared-lib", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + } +} diff --git a/libs/shared/package.json b/libs/shared/package.json new file mode 100644 index 00000000000..8058b42e84c --- /dev/null +++ b/libs/shared/package.json @@ -0,0 +1,8 @@ +{ + "name": "@maybe-finance/shared-lib", + "version": "0.0.1", + "scripts": { + "lint": "eslint .", + "check-types": "tsc --noEmit --pretty" + } +} diff --git a/package.json b/package.json index 518f953f23b..b369d50ae6a 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,14 @@ "seed": "ts-node --transpile-only prisma/seed.ts" }, "private": true, + "workspaces": [ + "apps/*", + "libs/client/*", + "libs/design-system", + "libs/finicity-api", + "libs/server/*", + "libs/shared" + ], "dependencies": { "@auth/prisma-adapter": "^1.0.14", "@bull-board/express": "^4.6.4", @@ -247,6 +255,7 @@ "ts-jest": "28.0.5", "ts-node": "10.9.1", "ts-toolbelt": "^9.6.0", + "turbo": "^1.11.3", "typescript": "4.8.4", "url-loader": "^4.1.1", "wait-on": "^6.0.1", diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000000..2651084baff --- /dev/null +++ b/turbo.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://turbo.build/schema.json", + "pipeline": { + "check-types": {}, + "lint": {} + } +} diff --git a/yarn.lock b/yarn.lock index 70375fc960e..8e7b923e902 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19374,6 +19374,48 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +turbo-darwin-64@1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-1.11.3.tgz#fb51f6fa030ee7a169d383b5f4f7641df6a3bdb8" + integrity sha512-IsOOg2bVbIt3o/X8Ew9fbQp5t1hTHN3fGNQYrPQwMR2W1kIAC6RfbVD4A9OeibPGyEPUpwOH79hZ9ydFH5kifw== + +turbo-darwin-arm64@1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-1.11.3.tgz#f936cc7ba5565bd9be1ddc8ef4f15284044a63a5" + integrity sha512-FsJL7k0SaPbJzI/KCnrf/fi3PgCDCjTliMc/kEFkuWVA6Httc3Q4lxyLIIinz69q6JTx8wzh6yznUMzJRI3+dg== + +turbo-linux-64@1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-1.11.3.tgz#86f56a91c05eea512a187079f7f7f860d8168be6" + integrity sha512-SvW7pvTVRGsqtSkII5w+wriZXvxqkluw5FO/MNAdFw0qmoov+PZ237+37/NgArqE3zVn1GX9P6nUx9VO+xcQAg== + +turbo-linux-arm64@1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-1.11.3.tgz#0001dab6ded89154e2a5be21e87720daba953056" + integrity sha512-YhUfBi1deB3m+3M55X458J6B7RsIS7UtM3P1z13cUIhF+pOt65BgnaSnkHLwETidmhRh8Dl3GelaQGrB3RdCDw== + +turbo-windows-64@1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-1.11.3.tgz#8d03c4fd8a46b81f2aecf60fc9845674c84d15a8" + integrity sha512-s+vEnuM2TiZuAUUUpmBHDr6vnNbJgj+5JYfnYmVklYs16kXh+EppafYQOAkcRIMAh7GjV3pLq5/uGqc7seZeHA== + +turbo-windows-arm64@1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-1.11.3.tgz#cc436d1462f5450e97f985ba6d8d447272bb97db" + integrity sha512-ZR5z5Zpc7cASwfdRAV5yNScCZBsgGSbcwiA/u3farCacbPiXsfoWUkz28iyrx21/TRW0bi6dbsB2v17swa8bjw== + +turbo@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.11.3.tgz#3bd823043585e1acfe125727bcecd4f91ef2103b" + integrity sha512-RCJOUFcFMQNIGKSjC9YmA5yVP1qtDiBA0Lv9VIgrXraI5Da1liVvl3VJPsoDNIR9eFMyA/aagx1iyj6UWem5hA== + optionalDependencies: + turbo-darwin-64 "1.11.3" + turbo-darwin-arm64 "1.11.3" + turbo-linux-64 "1.11.3" + turbo-linux-arm64 "1.11.3" + turbo-windows-64 "1.11.3" + turbo-windows-arm64 "1.11.3" + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"