Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: move definitions to packages #25085

Merged
merged 27 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2b66a9f
Ignore dist folders
ggazzo Apr 6, 2022
b8cebab
Create base packages structures
ggazzo Apr 6, 2022
a5e4d98
Moved definitions to Package
ggazzo Apr 6, 2022
b201cd5
Change Interfaces Import to package
ggazzo Apr 6, 2022
ea82c8c
Move interfaces and enuns to package
ggazzo Apr 6, 2022
be675ec
Manual moving and fixes
ggazzo Apr 6, 2022
3c3408c
Move Rest Definitions to Packages
ggazzo Apr 6, 2022
c718b93
....
ggazzo Apr 6, 2022
639a255
Fixed EE endpoints
ggazzo Apr 6, 2022
045982c
LINT
ggazzo Apr 6, 2022
ef40dfc
Merge branch 'monorepo' into monorepo-2
ggazzo Apr 6, 2022
dfad208
Fix --directory being passed to tsc
ggazzo Apr 7, 2022
0490355
Merge remote-tracking branch 'origin/develop' into monorepo-2
ggazzo Apr 7, 2022
4c79df8
Merge remote-tracking branch 'origin/develop' into monorepo-2
ggazzo Apr 7, 2022
3b169e6
Add Code owners
ggazzo Apr 7, 2022
7ebfc54
test yarn services
ggazzo Apr 8, 2022
8d09716
Merge remote-tracking branch 'origin/develop' into monorepo-2
ggazzo Apr 9, 2022
178405d
CI
ggazzo Apr 9, 2022
0882bcb
improve cache strategy
ggazzo Apr 9, 2022
1ec1f41
use cache from setup-node
ggazzo Apr 9, 2022
00cc675
..
ggazzo Apr 9, 2022
11f5aca
fix
ggazzo Apr 11, 2022
fc334f8
..
ggazzo Apr 11, 2022
b722d1a
Merge remote-tracking branch 'origin/develop' into monorepo-2
ggazzo Apr 11, 2022
87f88fb
add private fields to package
ggazzo Apr 12, 2022
0073ce7
fix hash key
ggazzo Apr 13, 2022
ff7b7fb
Merge remote-tracking branch 'origin/develop' into monorepo-2
ggazzo Apr 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages/core-typings/* @RocketChat/chat-engine
.vscode/* @RocketChat/chat-engine
.github/* @RocketChat/chat-engine
142 changes: 73 additions & 69 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,35 @@ jobs:
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.OS }}-cache-cypress-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

# - name: Cache node modules
# id: cache-nodemodules
# uses: actions/cache@v2
# with:
# path: |
# ./node_modules
# ./ee/server/services/node_modules
# key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
- uses: c-hive/gha-yarn-cache@v2
- name: Cache turbo
id: cache-turbo
uses: actions/cache@v2
with:
path: |
./node_modules/.turbo
key: ${{ runner.OS }}-turbo-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turbo-
${{ runner.os }}-

# TODO change to use turbo cache
- name: Cache meteor local
uses: actions/cache@v2
with:
path: ./apps/meteor/.meteor/local
key: ${{ runner.OS }}-meteor_cache-${{ hashFiles('apps/meteor/.meteor/versions', '.github/workflows/build_and_test.yml') }}

key: ${{ runner.OS }}-meteor_cache-${{ hashFiles('apps/meteor/.meteor/versions') }}
restore-keys: |
${{ runner.os }}-meteor_cache-
${{ runner.os }}-
- name: Cache meteor
uses: actions/cache@v2
with:
path: ~/.meteor
key: ${{ runner.OS }}-meteor-${{ hashFiles('apps/meteor/.meteor/release', '.github/workflows/build_and_test.yml') }}

key: ${{ runner.OS }}-meteor-${{ hashFiles('apps/meteor/.meteor/release') }}
restore-keys: |
${{ runner.os }}-meteor-
${{ runner.os }}-
- name: Install Meteor
run: |
# Restore bin from cache
Expand Down Expand Up @@ -111,13 +117,9 @@ jobs:
meteor node -v
git version

- name: npm install
- name: yarn install
# if: steps.cache-nodemodules.outputs.cache-hit != 'true' || steps.cache-cypress.outputs.cache-hit != 'true'
run: |
yarn
cd ./apps/meteor/ee/server/services
npm install
cd -
run: yarn

- run: yarn lint

Expand All @@ -126,8 +128,6 @@ jobs:
- name: TS typecheck
run: |
yarn turbo run typecheck
cd ./apps/meteor/ee/server/services
meteor npm run typecheck

- name: Reset Meteor
if: startsWith(github.ref, 'refs/tags/') == 'true' || github.ref == 'refs/heads/develop'
Expand Down Expand Up @@ -218,17 +218,22 @@ jobs:
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.OS }}-cache-cypress-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

# - name: Cache node modules
# id: cache-nodemodules
# uses: actions/cache@v2
# with:
# path: |
# ./node_modules
# ./apps/meteor/ee/server/services/node_modules
# key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: NPM install
restore-keys: |
${{ runner.os }}-cache-cypress-
${{ runner.os }}-
- uses: c-hive/gha-yarn-cache@v2
- name: Cache turbo
id: cache-turbo
uses: actions/cache@v2
with:
path: |
./node_modules/.turbo
key: ${{ runner.OS }}-turbo-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turbo-
${{ runner.os }}-

- name: Yarn install
# if: steps.cache-nodemodules.outputs.cache-hit != 'true' || steps.cache-cypress.outputs.cache-hit != 'true'
run: yarn

Expand Down Expand Up @@ -346,27 +351,24 @@ jobs:
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.OS }}-cache-cypress-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

# - name: Cache node modules
# id: cache-nodemodules
# uses: actions/cache@v2
# with:
# path: |
# ./node_modules
# ./apps/meteor/ee/server/services/node_modules
# key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: NPM install
- uses: c-hive/gha-yarn-cache@v2
- name: Cache turbo
id: cache-turbo
uses: actions/cache@v2
with:
path: |
./node_modules/.turbo
key: ${{ runner.OS }}-turbo-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turbo-
${{ runner.os }}-

- name: Yarn install
# if: steps.cache-nodemodules.outputs.cache-hit != 'true' || steps.cache-cypress.outputs.cache-hit != 'true'
run: |
yarn
cd ./apps/meteor/ee/server/services
npm install
run: yarn

- name: Build micro services
run: |
cd ./apps/meteor/ee/server/services
npm run build
run: yarn build:services

- name: E2E Test API
env:
Expand Down Expand Up @@ -486,28 +488,34 @@ jobs:
sudo apt clean
docker rmi $(docker image ls -aq)
df -h

# - name: Cache node modules
# id: cache-nodemodules
# uses: actions/cache@v2
# with:
# path: |
# ./node_modules
# ./apps/meteor/ee/server/services/node_modules
# key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
- uses: c-hive/gha-yarn-cache@v2
- name: Cache turbo
id: cache-turbo
uses: actions/cache@v2
with:
path: |
./node_modules/.turbo
key: ${{ runner.OS }}-turbo-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-turbo-
${{ runner.os }}-

- name: Cache meteor local
uses: actions/cache@v2
with:
path: ./apps/meteor/.meteor/local
key: ${{ runner.OS }}-meteor_cache-${{ hashFiles('.meteor/versions', '.github/workflows/build_and_test.yml') }}

key: ${{ runner.OS }}-meteor_cache-${{ hashFiles('.meteor/versions') }}
restore-keys: |
${{ runner.os }}-meteor_cache-
${{ runner.os }}-
- name: Cache meteor
uses: actions/cache@v2
with:
path: ~/.meteor
key: ${{ runner.OS }}-meteor-${{ hashFiles('.meteor/release', '.github/workflows/build_and_test.yml') }}

key: ${{ runner.OS }}-meteor-${{ hashFiles('.meteor/release') }}
restore-keys: |
${{ runner.os }}-meteor-
${{ runner.os }}-
- name: Use Node.js 14.18.3
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -542,7 +550,7 @@ jobs:
meteor node -v
git version

- name: npm install
- name: Yarn install
# if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: yarn

Expand Down Expand Up @@ -816,11 +824,7 @@ jobs:

# first install repo dependencies
yarn

# then micro services dependencies
cd ./apps/meteor/ee/server/services
npm i
npm run build
yarn build:services

echo "Building Docker image for service: ${{ matrix.service }}:${IMAGE_TAG}"

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ coverage
out/
build
dist

# misc
.DS_Store
*.pem
Expand Down
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"eslint.workingDirectories": [
{
"directory": "packages/*",
"changeProcessCWD": true
},
{
"directory": "apps/meteor",
"changeProcessCWD": true
}
],
"typescript.tsdk": "./node_modules/typescript/lib"
}
Loading