From bba89ee11b8a7faa8c4d7cfd8e58e203c035cd6b Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Wed, 1 Jun 2022 05:00:08 +0800 Subject: [PATCH 1/5] speedup --- scripts/integration-tests/e2e-jest.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/integration-tests/e2e-jest.sh b/scripts/integration-tests/e2e-jest.sh index 83cb98c2175c..2c5c0d36199c 100755 --- a/scripts/integration-tests/e2e-jest.sh +++ b/scripts/integration-tests/e2e-jest.sh @@ -58,6 +58,8 @@ if [ "$BABEL_8_BREAKING" = true ] ; then " fi +sed -i 's/"skipLibCheck": false,/"skipLibCheck": true,/g' tsconfig.json # Speedup + yarn build # The full test suite takes about 20mins on CircleCI. We run only a few of them From 47afb70a1ae168c0bdf9c200c265eb15c20b7a47 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Wed, 1 Jun 2022 10:37:32 +0800 Subject: [PATCH 2/5] speedup --- .github/workflows/e2e-tests-breaking.yml | 22 ++++++++++++++++++++++ .github/workflows/e2e-tests.yml | 23 ++++++++++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests-breaking.yml b/.github/workflows/e2e-tests-breaking.yml index e4523984e12c..26f917b93b71 100644 --- a/.github/workflows/e2e-tests-breaking.yml +++ b/.github/workflows/e2e-tests-breaking.yml @@ -45,12 +45,34 @@ jobs: - react-native - prettier steps: + - name: Get yarn1 cache directory path + id: yarn1-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" - name: Checkout code uses: actions/checkout@v3 - name: Use Node.js latest uses: actions/setup-node@v3 with: node-version: "*" + - name: Get yarn3 cache directory path + id: yarn3-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - name: Use yarn1 cache + uses: actions/cache@v3 + id: yarn1-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn1-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}- + - name: Use yarn3 cache + uses: actions/cache@v3 + id: yarn3-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn3-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}- - uses: actions/download-artifact@v3 with: name: verdaccio-workspace diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 5bd16e2a0f08..da0d5870f01b 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -44,13 +44,34 @@ jobs: - react-native - prettier steps: + - name: Get yarn1 cache directory path + id: yarn1-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" - name: Checkout code uses: actions/checkout@v3 - name: Use Node.js latest uses: actions/setup-node@v3 with: node-version: "*" - cache: "yarn" + - name: Get yarn3 cache directory path + id: yarn3-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - name: Use yarn1 cache + uses: actions/cache@v3 + id: yarn1-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn1-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn1-e2e-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn1-e2e-${{ matrix.project }}- + - name: Use yarn3 cache + uses: actions/cache@v3 + id: yarn3-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn3-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn3-e2e-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn3-e2e-${{ matrix.project }}- - uses: actions/download-artifact@v3 with: name: verdaccio-workspace From 646749664acd08a96bea398c2b4f0a2af44c8338 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Wed, 1 Jun 2022 12:32:57 +0800 Subject: [PATCH 3/5] fix --- .github/workflows/e2e-tests-breaking.yml | 4 ++++ .github/workflows/e2e-tests.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/e2e-tests-breaking.yml b/.github/workflows/e2e-tests-breaking.yml index 26f917b93b71..56ec9d558ac1 100644 --- a/.github/workflows/e2e-tests-breaking.yml +++ b/.github/workflows/e2e-tests-breaking.yml @@ -73,6 +73,10 @@ jobs: key: ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}- + - name: Clean babel cache + run: | + rm -rf ${{ steps.yarn1-cache-dir-path.outputs.dir }}/*babel* + rm -rf ${{ steps.yarn3-cache-dir-path.outputs.dir }}/*babel* - uses: actions/download-artifact@v3 with: name: verdaccio-workspace diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index da0d5870f01b..1548ccbe11d1 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -72,6 +72,10 @@ jobs: key: ${{ runner.os }}-yarn3-e2e-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn3-e2e-${{ matrix.project }}- + - name: Clean babel cache + run: | + rm -rf ${{ steps.yarn1-cache-dir-path.outputs.dir }}/*babel* + rm -rf ${{ steps.yarn3-cache-dir-path.outputs.dir }}/*babel* - uses: actions/download-artifact@v3 with: name: verdaccio-workspace From 92bdd3c4e5a2ce58979baac8be4970561e334df8 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Thu, 2 Jun 2022 00:42:38 +0800 Subject: [PATCH 4/5] review --- .github/workflows/e2e-tests-breaking.yml | 6 ++---- .github/workflows/e2e-tests.yml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-tests-breaking.yml b/.github/workflows/e2e-tests-breaking.yml index 56ec9d558ac1..7d9627a71de4 100644 --- a/.github/workflows/e2e-tests-breaking.yml +++ b/.github/workflows/e2e-tests-breaking.yml @@ -63,16 +63,14 @@ jobs: with: path: ${{ steps.yarn1-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}- + restore-keys: ${{ runner.os }}-yarn1-e2e-breaking-${{ matrix.project }}- - name: Use yarn3 cache uses: actions/cache@v3 id: yarn3-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn3-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}- + restore-keys: ${{ runner.os }}-yarn3-e2e-breaking-${{ matrix.project }}- - name: Clean babel cache run: | rm -rf ${{ steps.yarn1-cache-dir-path.outputs.dir }}/*babel* diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 1548ccbe11d1..d4a770b75ece 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -62,16 +62,14 @@ jobs: with: path: ${{ steps.yarn1-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn1-e2e-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn1-e2e-${{ matrix.project }}- + restore-keys: ${{ runner.os }}-yarn1-e2e-${{ matrix.project }}- - name: Use yarn3 cache uses: actions/cache@v3 id: yarn3-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn3-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn3-e2e-${{ matrix.project }}-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn3-e2e-${{ matrix.project }}- + restore-keys: ${{ runner.os }}-yarn3-e2e-${{ matrix.project }}- - name: Clean babel cache run: | rm -rf ${{ steps.yarn1-cache-dir-path.outputs.dir }}/*babel* From a53709784ffe18048067b4ed31ae268bda8eca54 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Thu, 2 Jun 2022 02:52:28 +0800 Subject: [PATCH 5/5] test --- scripts/integration-tests/e2e-jest.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/integration-tests/e2e-jest.sh b/scripts/integration-tests/e2e-jest.sh index 2c5c0d36199c..c774e21eb52a 100755 --- a/scripts/integration-tests/e2e-jest.sh +++ b/scripts/integration-tests/e2e-jest.sh @@ -67,8 +67,8 @@ yarn build # The goals of this e2e test are: # 1) Check that the typescript compilation isn't completely broken # 2) Make sure that we don't accidentally break jest's usage of the Babel API -CI=true yarn test-ci-partial packages -CI=true yarn test-ci-partial e2e/__tests__/babel -CI=true yarn test-ci-partial e2e/__tests__/transform +CI=true yarn jest --color --maxWorkers=2 --config jest.config.mjs packages +CI=true yarn jest --color --maxWorkers=2 --config jest.config.mjs e2e/__tests__/babel +CI=true yarn jest --color --maxWorkers=2 --config jest.config.mjs e2e/__tests__/transform cleanup