From 109b775f567528fc28fc1df9ff791de10435bb4d Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 19 Jul 2024 11:28:01 -0400 Subject: [PATCH 1/8] Update [ghstack-poisoned] --- .../workflows/devtools_regression_tests.yml | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 .github/workflows/devtools_regression_tests.yml diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml new file mode 100644 index 0000000000000..dc3d9b3ce5d9b --- /dev/null +++ b/.github/workflows/devtools_regression_tests.yml @@ -0,0 +1,167 @@ +name: (DevTools) Regression Tests + +on: + pull_request: + branches: + - 'gh/poteto/**' # @nocommit + schedule: + - cron: 0 0 * * * + workflow_dispatch: + inputs: + prerelease_commit_sha: + required: false + +env: + TZ: /usr/share/zoneinfo/America/Los_Angeles + +jobs: + download_build: + if: inputs.prerelease_commit_sha == '' + name: Download base build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + cache: yarn + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }} + - run: yarn install --frozen-lockfile + - run: yarn install --frozen-lockfile + working-directory: scripts/release + - name: Download react-devtools artifacts for base revision + run: | + git fetch origin main + GH_TOKEN=${{ github.token }} scripts/release/download-experimental-build-ghaction.js --commit=${{ github.sha }} + - name: Display structure of build + run: ls -R build + - name: Archive build + uses: actions/upload-artifact@v4 + with: + name: build + path: build + + build_devtools_and_process_artifacts: + name: Build DevTools and process artifacts + needs: download_build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + cache: yarn + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile + - name: Restore archived build + uses: actions/download-artifact@v4 + with: + name: build + path: build + - run: ./scripts/circleci/pack_and_store_devtools_artifacts.sh + env: + RELEASE_CHANNEL: experimental + - name: Display structure of build + run: ls -R build + - name: Archive devtools build + uses: actions/upload-artifact@v4 + with: + name: react-devtools + path: build/devtools.tgz + # Simplifies getting the extension for local testing + - name: Archive chrome extension + uses: actions/upload-artifact@v4 + with: + name: react-devtools-chrome-extension + path: build/devtools/chrome-extension.zip + - name: Archive firefox extension + uses: actions/upload-artifact@v4 + with: + name: react-devtools-firefox-extension + path: build/devtools/firefox-extension.zip + + run_devtools_tests_for_versions: + name: Run DevTools tests for versions + needs: build_devtools_and_process_artifacts + runs-on: ubuntu-latest + strategy: + matrix: + version: + - 16.0 + - 16.5 # schedule package + - 16.8 # hooks + - 17.0 + - 18.0 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + cache: yarn + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile + - name: Restore all archived build artifacts + uses: actions/download-artifact@v4 + - run: ./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }} --replaceBuild + - run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion ${{ matrix.version }} --ci=github + + run_devtools_e2e_tests_for_versions: + name: Run DevTools e2e tests for versions + needs: build_devtools_and_process_artifacts + runs-on: ubuntu-latest + strategy: + matrix: + version: + - 16.0 + - 16.5 # schedule package + - 16.8 # hooks + - 17.0 + - 18.0 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + cache: yarn + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile + - name: Restore all archived build artifacts + uses: actions/download-artifact@v4 + - name: Playwright install deps + run: | + npx playwright install + sudo npx playwright install-deps + - run: ./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }} + - run: ./scripts/circleci/run_devtools_e2e_tests.js ${{ matrix.version }} + env: + RELEASE_CHANNEL: experimental + - name: Cleanup build regression folder + run: rm -r ./build-regression + - uses: actions/upload-artifact@v4 + with: + name: screenshots + path: ./tmp/screenshots From 454864fd7fa19f27f5aa28dcf4a0ce5b34a61aec Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 19 Jul 2024 11:31:45 -0400 Subject: [PATCH 2/8] Update [ghstack-poisoned] --- .github/workflows/devtools_regression_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index dc3d9b3ce5d9b..2c9600be684c2 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -38,7 +38,7 @@ jobs: - name: Download react-devtools artifacts for base revision run: | git fetch origin main - GH_TOKEN=${{ github.token }} scripts/release/download-experimental-build-ghaction.js --commit=${{ github.sha }} + GH_TOKEN=${{ github.token }} scripts/release/download-experimental-build-ghaction.js --commit=$(git rev-parse origin/main) - name: Display structure of build run: ls -R build - name: Archive build From d8b35d14d013df7890c0b36c24b9860a20b14b30 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 19 Jul 2024 11:56:14 -0400 Subject: [PATCH 3/8] Update [ghstack-poisoned] --- .github/workflows/devtools_regression_tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index 2c9600be684c2..0b751140d3b2d 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -104,6 +104,7 @@ jobs: - 16.8 # hooks - 17.0 - 18.0 + continue-on-error: true steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -120,6 +121,8 @@ jobs: - run: yarn install --frozen-lockfile - name: Restore all archived build artifacts uses: actions/download-artifact@v4 + - name: Display structure of build + run: ls -R build - run: ./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }} --replaceBuild - run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion ${{ matrix.version }} --ci=github @@ -135,6 +138,7 @@ jobs: - 16.8 # hooks - 17.0 - 18.0 + continue-on-error: true steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -151,6 +155,8 @@ jobs: - run: yarn install --frozen-lockfile - name: Restore all archived build artifacts uses: actions/download-artifact@v4 + - name: Display structure of build + run: ls -R build - name: Playwright install deps run: | npx playwright install From c4e0985c8c99a50f6e862cb867dd144e98594ab3 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 19 Jul 2024 14:03:47 -0400 Subject: [PATCH 4/8] Update [ghstack-poisoned] --- .github/workflows/devtools_regression_tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index 0b751140d3b2d..90629287261b0 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -162,6 +162,7 @@ jobs: npx playwright install sudo npx playwright install-deps - run: ./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }} + - run: ls -R build-regression - run: ./scripts/circleci/run_devtools_e2e_tests.js ${{ matrix.version }} env: RELEASE_CHANNEL: experimental From 1049cbbbf51884b4be585d672ac56ed7b0691acb Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 22 Jul 2024 14:05:14 -0400 Subject: [PATCH 5/8] Update [ghstack-poisoned] --- .../workflows/devtools_regression_tests.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index 90629287261b0..cf7382232763f 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -119,8 +119,15 @@ jobs: path: "**/node_modules" key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - run: yarn install --frozen-lockfile - - name: Restore all archived build artifacts + - name: Restore archived build + uses: actions/download-artifact@v4 + with: + name: build + - name: Restore archived react-devtools uses: actions/download-artifact@v4 + with: + name: react-devtools + path: build/devtools.tgz - name: Display structure of build run: ls -R build - run: ./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }} --replaceBuild @@ -153,8 +160,15 @@ jobs: path: "**/node_modules" key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - run: yarn install --frozen-lockfile - - name: Restore all archived build artifacts + - name: Restore archived build + uses: actions/download-artifact@v4 + with: + name: build + - name: Restore archived react-devtools uses: actions/download-artifact@v4 + with: + name: react-devtools + path: build/devtools.tgz - name: Display structure of build run: ls -R build - name: Playwright install deps From e9528deba2c20c9f6c3d214131f0e75f52494bdf Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 22 Jul 2024 14:15:26 -0400 Subject: [PATCH 6/8] Update [ghstack-poisoned] --- .github/workflows/devtools_regression_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index cf7382232763f..d69c600226477 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -127,7 +127,7 @@ jobs: uses: actions/download-artifact@v4 with: name: react-devtools - path: build/devtools.tgz + path: build - name: Display structure of build run: ls -R build - run: ./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }} --replaceBuild @@ -168,7 +168,7 @@ jobs: uses: actions/download-artifact@v4 with: name: react-devtools - path: build/devtools.tgz + path: build - name: Display structure of build run: ls -R build - name: Playwright install deps From 1f097552d6f42ee5608846bf59ad62e4ec8cd6b2 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 22 Jul 2024 14:20:33 -0400 Subject: [PATCH 7/8] Update [ghstack-poisoned] --- .../workflows/devtools_regression_tests.yml | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index d69c600226477..90629287261b0 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -119,15 +119,8 @@ jobs: path: "**/node_modules" key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - run: yarn install --frozen-lockfile - - name: Restore archived build - uses: actions/download-artifact@v4 - with: - name: build - - name: Restore archived react-devtools + - name: Restore all archived build artifacts uses: actions/download-artifact@v4 - with: - name: react-devtools - path: build - name: Display structure of build run: ls -R build - run: ./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }} --replaceBuild @@ -160,15 +153,8 @@ jobs: path: "**/node_modules" key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - run: yarn install --frozen-lockfile - - name: Restore archived build - uses: actions/download-artifact@v4 - with: - name: build - - name: Restore archived react-devtools + - name: Restore all archived build artifacts uses: actions/download-artifact@v4 - with: - name: react-devtools - path: build - name: Display structure of build run: ls -R build - name: Playwright install deps From 076fd2a0343dee03e6e983ad87493d03e0ae20b0 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Thu, 25 Jul 2024 17:07:34 -0400 Subject: [PATCH 8/8] Update [ghstack-poisoned] --- .../workflows/devtools_regression_tests.yml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/devtools_regression_tests.yml b/.github/workflows/devtools_regression_tests.yml index 90629287261b0..bf4e4d3687ffe 100644 --- a/.github/workflows/devtools_regression_tests.yml +++ b/.github/workflows/devtools_regression_tests.yml @@ -99,11 +99,11 @@ jobs: strategy: matrix: version: - - 16.0 - - 16.5 # schedule package - - 16.8 # hooks - - 17.0 - - 18.0 + - "16.0" + - "16.5" # schedule package + - "16.8" # hooks + - "17.0" + - "18.0" continue-on-error: true steps: - uses: actions/checkout@v4 @@ -133,11 +133,11 @@ jobs: strategy: matrix: version: - - 16.0 - - 16.5 # schedule package - - 16.8 # hooks - - 17.0 - - 18.0 + - "16.0" + - "16.5" # schedule package + - "16.8" # hooks + - "17.0" + - "18.0" continue-on-error: true steps: - uses: actions/checkout@v4