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: Improve time of meteor build #28128

Merged
merged 40 commits into from Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
eeab00e
Change uses of session file to memory variable
rodrigok Feb 18, 2023
b583076
Convert omnichannel tests and reuse code
rodrigok Feb 18, 2023
6102715
Wait for login screen on e2e logout
rodrigok Feb 18, 2023
43339fe
Fix typecheck
rodrigok Feb 18, 2023
010182d
Fix e2e test
rodrigok Feb 18, 2023
ea6a30f
Fix typecheck
rodrigok Feb 18, 2023
4ac16d6
Fix alerts about deprecated output feature
rodrigok Feb 20, 2023
11917b7
Test make generic variables
rodrigok Feb 20, 2023
eb099ac
Move more env variables
rodrigok Feb 20, 2023
b204c39
Unify ts and lint checks
rodrigok Feb 20, 2023
55886b9
Unify ui and api tests
rodrigok Feb 20, 2023
ef937b1
Change timeout waiting for instance to start
rodrigok Feb 20, 2023
b59e56a
Fix shard
rodrigok Feb 20, 2023
73f72af
Unify CE and EE tests
rodrigok Feb 21, 2023
b271e0e
Test reusable workflow
rodrigok Feb 22, 2023
b4d4143
Merge remote-tracking branch 'origin/develop' into improve/ci-dry
rodrigok Feb 22, 2023
4d74923
Merge remote-tracking branch 'origin/develop' into improve/ci-dry
rodrigok Feb 22, 2023
31c28c7
Merge remote-tracking branch 'origin/improve/ci-dry' into improve/ci-…
rodrigok Feb 22, 2023
e0f88ee
Reuse workflow
rodrigok Feb 22, 2023
de7f372
Merge remote-tracking branch 'origin/develop' into improve/ci-dry-more
rodrigok Feb 22, 2023
e31adf8
Continue
rodrigok Feb 22, 2023
a4a573d
Fix typo
rodrigok Feb 23, 2023
a255e7e
Try cache of nodemodules
rodrigok Feb 23, 2023
1375259
Merge branch 'develop' into improve/ci-dry-more
rodrigok Feb 23, 2023
54f31d6
Merge branch 'improve/ci-dry-more' into improve/ci-yarn-cache
ggazzo Feb 23, 2023
8e61e0d
Upgrade download-artifact action
rodrigok Feb 23, 2023
2c52450
Merge branch 'improve/ci-yarn-cache' of https://github.com/RocketChat…
rodrigok Feb 23, 2023
2789370
Test build change
rodrigok Feb 23, 2023
8249503
Cache yarn global if node-modules didn’t hit
rodrigok Feb 23, 2023
515833a
Fix turbo config
rodrigok Feb 23, 2023
d244f98
Disable cache of node_modules
rodrigok Feb 23, 2023
13b168b
Fix wrong test type for UI EE tests
rodrigok Feb 23, 2023
4883155
Merge branch 'improve/ci-dry-more' into improve/ci-yarn-cache
rodrigok Feb 23, 2023
9f46ad0
Test cache of all node_modules
rodrigok Feb 23, 2023
3986e1e
Merge remote-tracking branch 'origin/develop' into improve/ci-yarn-cache
rodrigok Feb 23, 2023
dffdea7
Try another method to cache node_modules
rodrigok Feb 23, 2023
fe9a039
Ignore node_modules cache
rodrigok Feb 23, 2023
2d496b9
Merge branch 'develop' into improve/ci-yarn-cache
rodrigok Feb 23, 2023
c72ebc9
Add notes
rodrigok Feb 23, 2023
c270350
Merge branch 'improve/ci-yarn-cache' of https://github.com/RocketChat…
rodrigok Feb 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 26 additions & 2 deletions .github/actions/setup-node/action.yml
Expand Up @@ -2,9 +2,14 @@ name: 'Setup Node'

inputs:
node-version:
# default: '14.21.2'
required: true
type: string
cache-modules:
required: false
type: boolean
install:
required: false
type: boolean

outputs:
node-version:
Expand All @@ -14,9 +19,28 @@ runs:
using: composite

steps:
# - name: Cache Node Modules
# if: inputs.cache-modules
# id: cache-node-modules
# uses: actions/cache@v3
# with:
# path: |
# node_modules
# **/node_modules
# key: node-modules-${{ hashFiles('yarn.lock') }}
#
# Could use this command to list all paths to save:
# find . -name 'node_modules' -prune | grep -v "/\.meteor/" | grep -v "/meteor/packages/"

- name: Use Node.js ${{ inputs.node-version }}
id: node-version
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: 'yarn'
cache: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' && 'yarn' || '' }}

- name: yarn install
# if: inputs.install && steps.cache-node-modules.outputs.cache-hit != 'true'
if: inputs.install
shell: bash
run: yarn
14 changes: 3 additions & 11 deletions .github/workflows/ci-code-check.yml
Expand Up @@ -33,26 +33,18 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true

# - name: Free disk space
# run: |
# sudo apt clean
# docker rmi $(docker image ls -aq)
# df -h

# - name: Versions
# run: |
# npm --versions
# yarn -v
# node -v
# git version

- name: yarn install
run: yarn

- uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: TS typecheck
- name: TS TypeCheck
if: matrix.check == 'ts'
run: yarn turbo run typecheck

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci-test-e2e.yml
Expand Up @@ -90,17 +90,16 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
cache-modules: true
install: true

- uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: yarn install
run: yarn

- name: yarn build
run: yarn build

- name: Restore build
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build
path: /tmp/build
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci-test-unit.yml
Expand Up @@ -38,9 +38,8 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}

- name: yarn install
run: yarn
cache-modules: true
install: true

- uses: dtinth/setup-github-actions-caching-for-turbo@v1

Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Expand Up @@ -106,6 +106,8 @@ jobs:
uses: ./.github/actions/setup-node
with:
node-version: ${{ needs.release-versions.outputs.node-version }}
cache-modules: true
install: true

# - name: Free disk space
# run: |
Expand Down Expand Up @@ -158,9 +160,6 @@ jobs:
meteor node -v
git version

- name: yarn install
run: yarn

- uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Translation check
Expand All @@ -175,15 +174,15 @@ jobs:
if: startsWith(github.ref, 'refs/pull/') == true
env:
METEOR_PROFILE: 1000
run: yarn build:ci -- --debug --directory dist
run: yarn build:ci -- --debug --directory /tmp/dist

- name: Build Rocket.Chat
if: startsWith(github.ref, 'refs/pull/') != true
run: yarn build:ci -- --directory dist
run: yarn build:ci -- --directory /tmp/dist

- name: Prepare build
run: |
cd apps/meteor/dist
cd /tmp/dist
tar czf /tmp/Rocket.Chat.tar.gz bundle

- name: Store build
Expand Down Expand Up @@ -309,7 +308,7 @@ jobs:
- uses: actions/checkout@v3

- name: Restore build
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build
path: /tmp/build
Expand Down Expand Up @@ -388,7 +387,7 @@ jobs:
- uses: actions/checkout@v3

- name: Restore build
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: build
path: /tmp/build
Expand Down
4 changes: 4 additions & 0 deletions turbo.json
Expand Up @@ -42,6 +42,10 @@
"@rocket.chat/ui-contexts#build": {
"dependsOn": ["^build"],
"cache": false
},
"@rocket.chat/meteor#build:ci": {
"dependsOn": ["^build"],
"cache": false
}
}
}