Skip to content

Commit

Permalink
Chore: move definitions to packages (#25085)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Apr 13, 2022
1 parent b3e0c7e commit 977f167
Show file tree
Hide file tree
Showing 879 changed files with 8,419 additions and 9,026 deletions.
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

0 comments on commit 977f167

Please sign in to comment.