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 5435cd0
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 53 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
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
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

0 comments on commit 5435cd0

Please sign in to comment.