Skip to content

Commit

Permalink
Update scripts and documentation to use nx and new monorepo architect…
Browse files Browse the repository at this point in the history
…ure (twentyhq#2912)

* Update scripts and documentation to use nx and new monorepo architecture

* Start fixing docker

* Migrate eslint plugin and postgres setup

* Fix docker

* Fix patches

* Fix

* fix: wip try to fix the patches

* Apply patches

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
  • Loading branch information
charlesBochet and magrinj authored Dec 11, 2023
1 parent f91bb35 commit 44baaee
Show file tree
Hide file tree
Showing 67 changed files with 407 additions and 14,093 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/ci-front.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache twenty-eslint-plugin node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: packages/twenty-eslint-plugin/node_modules
key: twenty-eslint-plugin-node_modules-${{hashFiles('packages/twenty-eslint-plugin/yarn.lock')}}
restore-keys: twenty-eslint-plugin-node_modules-
- name: Front / Install Dependencies
run: cd front && yarn
front-pages-sb-test:
Expand Down Expand Up @@ -58,12 +58,12 @@ jobs:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache twenty-eslint-plugin node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: packages/twenty-eslint-plugin/node_modules
key: twenty-eslint-plugin-node_modules-${{hashFiles('packages/twenty-eslint-plugin/yarn.lock')}}
restore-keys: twenty-eslint-plugin-node_modules-
- name: Install dependencies
run: yarn
- name: Install Playwright
Expand Down Expand Up @@ -100,12 +100,12 @@ jobs:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache twenty-eslint-plugin node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: packages/twenty-eslint-plugin/node_modules
key: twenty-eslint-plugin-node_modules-${{hashFiles('packages/twenty-eslint-plugin/yarn.lock')}}
restore-keys: twenty-eslint-plugin-node_modules-
- name: Install Playwright
run: cd front && npx playwright install
- name: Build Storybook
Expand Down Expand Up @@ -136,12 +136,12 @@ jobs:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache twenty-eslint-plugin node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: packages/twenty-eslint-plugin/node_modules
key: twenty-eslint-plugin-node_modules-${{hashFiles('packages/twenty-eslint-plugin/yarn.lock')}}
restore-keys: twenty-eslint-plugin-node_modules-
- name: Front / Install Dependencies
run: cd front && yarn
- name: Front / Run linter
Expand All @@ -167,11 +167,11 @@ jobs:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache twenty-eslint-plugin node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: packages/twenty-eslint-plugin/node_modules
key: twenty-eslint-plugin-node_modules-${{hashFiles('packages/twenty-eslint-plugin/yarn.lock')}}
restore-keys: twenty-eslint-plugin-node_modules-
- name: Front / Run jest
run: cd front && yarn test
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
**/**/.env
.DS_Store
.idea/workspace.xml
node_modules/
**/**/node_modules/

# yarn is the recommended package manager across the project
.package-lock.json
**/**/.package-lock.json

.nx/installation
.nx/cache
.nx/cache

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
File renamed without changes.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,5 @@
},
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
}
}
Binary file removed .yarn/install-state.gz
Binary file not shown.
5 changes: 0 additions & 5 deletions .yarn/sdks/integrations.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/typescript/bin/tsc

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/typescript/bin/tsserver

This file was deleted.

20 changes: 0 additions & 20 deletions .yarn/sdks/typescript/lib/tsc.js

This file was deleted.

Loading

0 comments on commit 44baaee

Please sign in to comment.