Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo committed Apr 9, 2022
1 parent 8d09716 commit 2d23839
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 78 deletions.
79 changes: 32 additions & 47 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.OS }}-cache-cypress-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- uses: c-hive/gha-yarn-cache@v2
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
Expand Down Expand Up @@ -110,13 +110,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 @@ -125,8 +121,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 @@ -217,17 +211,16 @@ jobs:
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.OS }}-cache-cypress-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
- uses: c-hive/gha-yarn-cache@v2
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
with:
path: |
./node_modules/.turbo
key: ${{ runner.OS }}-node_modules-${{ hashFiles('**/yarn.lock', '.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
- name: Yarn install
# if: steps.cache-nodemodules.outputs.cache-hit != 'true' || steps.cache-cypress.outputs.cache-hit != 'true'
run: yarn

Expand Down Expand Up @@ -322,24 +315,21 @@ jobs:
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.OS }}-cache-cypress-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
- uses: c-hive/gha-yarn-cache@v2
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v2
with:
path: |
./node_modules/.turbo
key: ${{ runner.OS }}-node_modules-${{ hashFiles('**/yarn.lock', '.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
- name: Yarn install
# if: steps.cache-nodemodules.outputs.cache-hit != 'true' || steps.cache-cypress.outputs.cache-hit != 'true'
run: yarn

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

- name: E2E Test API
env:
Expand Down Expand Up @@ -428,15 +418,14 @@ 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 node modules
id: cache-nodemodules
uses: actions/cache@v2
with:
path: |
./node_modules/.turbo
key: ${{ runner.OS }}-node_modules-${{ hashFiles('**/yarn.lock', '.github/workflows/build_and_test.yml') }}

- name: Cache meteor local
uses: actions/cache@v2
Expand Down Expand Up @@ -484,7 +473,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 @@ -758,11 +747,7 @@ jobs:
# first install repo dependencies
yarn
# then micro services dependencies
cd ./apps/meteor/ee/server/services
npm i
npm run build
yarn build --scope=rocketchat-services
echo "Building Docker image for service: ${{ matrix.service }}:${IMAGE_TAG}"
Expand Down
5 changes: 3 additions & 2 deletions apps/meteor/ee/server/services/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "rocketchat-authorization",
"name": "rocketchat-services",
"private": true,
"version": "1.0.0",
"description": "Rocket.Chat Authorization service",
"main": "index.js",
Expand Down Expand Up @@ -65,7 +66,7 @@
"pino-pretty": "^7.6.0",
"pm2": "^5.2.0",
"ts-node": "^10.7.0",
"typescript": "^4.3.5"
"typescript": "~4.3.5"
},
"volta": {
"node": "14.18.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/core-typings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@types/mongodb": "^3.6.10",
"eslint": "^8.12.0",
"prettier": "^2.6.1",
"typescript": "^4.3.5"
"typescript": "~4.3.5"
},
"scripts": {
"eslint": "eslint --ext .js,.jsx,.ts,.tsx .",
Expand Down
2 changes: 1 addition & 1 deletion packages/rest-typings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"eslint": "^8.12.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typescript": "^4.3.5"
"typescript": "~4.3.5"
},
"scripts": {
"eslint": "eslint --ext .js,.jsx,.ts,.tsx .",
Expand Down
34 changes: 7 additions & 27 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3225,7 +3225,7 @@ __metadata:
"@types/mongodb": ^3.6.10
eslint: ^8.12.0
prettier: ^2.6.1
typescript: ^4.3.5
typescript: ~4.3.5
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -3850,7 +3850,7 @@ __metadata:
eslint: ^8.12.0
jest: ^27.5.1
ts-jest: ^27.1.4
typescript: ^4.3.5
typescript: ~4.3.5
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -23894,9 +23894,9 @@ __metadata:
languageName: unknown
linkType: soft

"rocketchat-authorization@workspace:apps/meteor/ee/server/services":
"rocketchat-services@workspace:apps/meteor/ee/server/services":
version: 0.0.0-use.local
resolution: "rocketchat-authorization@workspace:apps/meteor/ee/server/services"
resolution: "rocketchat-services@workspace:apps/meteor/ee/server/services"
dependencies:
"@rocket.chat/apps-engine": ^1.31.0
"@rocket.chat/core-typings": "workspace:^"
Expand Down Expand Up @@ -23936,7 +23936,7 @@ __metadata:
sodium-native: ^3.3.0
sodium-plus: ^0.9.0
ts-node: ^10.7.0
typescript: ^4.3.5
typescript: ~4.3.5
underscore.string: ^3.3.6
uuid: ^7.0.3
ws: ^8.5.0
Expand Down Expand Up @@ -26825,17 +26825,7 @@ turbo@latest:
languageName: node
linkType: hard

"typescript@npm:^4.3.5":
version: 4.6.3
resolution: "typescript@npm:4.6.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 255bb26c8cb846ca689dd1c3a56587af4f69055907aa2c154796ea28ee0dea871535b1c78f85a6212c77f2657843a269c3a742d09d81495b97b914bf7920415b
languageName: node
linkType: hard

"typescript@npm:~4.3.4":
"typescript@npm:~4.3.4, typescript@npm:~4.3.5":
version: 4.3.5
resolution: "typescript@npm:4.3.5"
bin:
Expand All @@ -26845,17 +26835,7 @@ turbo@latest:
languageName: node
linkType: hard

"typescript@patch:typescript@^4.3.5#~builtin<compat/typescript>":
version: 4.6.3
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=bda367"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 6bf45caf847062420592e711bc9c28bf5f9a9a7fa8245343b81493e4ededae33f1774009d1234d911422d1646a2c839f44e1a23ecb111b40a60ac2ea4c1482a8
languageName: node
linkType: hard

"typescript@patch:typescript@~4.3.4#~builtin<compat/typescript>":
"typescript@patch:typescript@~4.3.4#~builtin<compat/typescript>, typescript@patch:typescript@~4.3.5#~builtin<compat/typescript>":
version: 4.3.5
resolution: "typescript@patch:typescript@npm%3A4.3.5#~builtin<compat/typescript>::version=4.3.5&hash=bda367"
bin:
Expand Down

0 comments on commit 2d23839

Please sign in to comment.