diff --git a/.github/workflows/e2e-tests-breaking.yml b/.github/workflows/e2e-tests-breaking.yml index e4523984e12c..7d9627a71de4 100644 --- a/.github/workflows/e2e-tests-breaking.yml +++ b/.github/workflows/e2e-tests-breaking.yml @@ -45,12 +45,36 @@ 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 }}- + - 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 5bd16e2a0f08..d4a770b75ece 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -44,13 +44,36 @@ 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 }}- + - 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/scripts/integration-tests/e2e-jest.sh b/scripts/integration-tests/e2e-jest.sh index 83cb98c2175c..c774e21eb52a 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 @@ -65,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