Skip to content

Commit 496e873

Browse files
authored
convert circleci workflow devtools_regression_tests to github actions (#27800)
## Summary This pull request converts the CircleCI workflows to GitHub actions workflows. [Github Actions Importer](https://github.com/github/gh-actions-importer) was used to convert the workflows initially, then I edited them manually to correct errors in translation. **Issues** 1. facebook/react/devtools_regression_tests The scripts that this workflow calls need to be modified. ## How did you test this change? I tested these changes in a forked repo. You can [view the logs of this workflow in my fork](https://github.com/robandpdx/react/actions). https://fburl.com/workplace/f6mz6tmw
1 parent b5e5ce8 commit 496e873

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: facebook/react/devtools_regression_tests
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
inputs:
10+
prerelease_commit_sha:
11+
required: false
12+
jobs:
13+
download_build:
14+
if: inputs.prerelease_commit_sha ==''
15+
runs-on: ubuntu-latest
16+
env:
17+
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
18+
revision: "${{ github.sha }}"
19+
steps:
20+
- uses: actions/[email protected]
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version-file: '.nvmrc'
24+
cache: 'yarn'
25+
- name: Install dependencies
26+
run: yarn install --frozen-lockfile
27+
env:
28+
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
29+
shell: bash
30+
- name: Download artifacts for revision
31+
run: |-
32+
git fetch origin main
33+
cd ./scripts/release && yarn && cd ../../
34+
scripts/release/download-experimental-build.js --commit=${{ env.revision }} --allowBrokenCI
35+
- uses: actions/[email protected]
36+
with:
37+
path: build
38+
build_devtools_and_process_artifacts:
39+
if: inputs.prerelease_commit_sha ==''
40+
runs-on: ubuntu-latest
41+
needs:
42+
- download_build
43+
env:
44+
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
45+
steps:
46+
- uses: actions/[email protected]
47+
- uses: actions/setup-node@v4
48+
with:
49+
node-version-file: '.nvmrc'
50+
cache: 'yarn'
51+
- uses: actions/[email protected]
52+
with:
53+
path: build
54+
- name: Install dependencies
55+
run: yarn install --frozen-lockfile
56+
env:
57+
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
58+
shell: bash
59+
- run: "./scripts/circleci/pack_and_store_devtools_artifacts.sh"
60+
env:
61+
RELEASE_CHANNEL: experimental
62+
- uses: actions/[email protected]
63+
with:
64+
path: build/devtools.tgz
65+
run_devtools_tests_for_versions:
66+
if: inputs.prerelease_commit_sha ==''
67+
runs-on: ubuntu-latest
68+
needs:
69+
- build_devtools_and_process_artifacts
70+
env:
71+
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
72+
strategy:
73+
matrix:
74+
version:
75+
- '16.0'
76+
- '16.5'
77+
- '16.8'
78+
- '17.0'
79+
- '18.0'
80+
steps:
81+
- uses: actions/[email protected]
82+
- uses: actions/setup-node@v4
83+
with:
84+
node-version-file: '.nvmrc'
85+
cache: 'yarn'
86+
- uses: actions/[email protected]
87+
with:
88+
path: build
89+
- name: Install dependencies
90+
run: yarn install --frozen-lockfile
91+
env:
92+
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
93+
shell: bash
94+
- run: "./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }} --replaceBuild"
95+
- run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion ${{ matrix.version }} --ci
96+
run_devtools_e2e_tests_for_versions:
97+
if: inputs.prerelease_commit_sha ==''
98+
runs-on: ubuntu-latest
99+
needs:
100+
- build_devtools_and_process_artifacts
101+
env:
102+
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
103+
strategy:
104+
matrix:
105+
version:
106+
- '16.0'
107+
- '16.5'
108+
- '16.8'
109+
- '17.0'
110+
- '18.0'
111+
steps:
112+
- uses: actions/[email protected]
113+
- uses: actions/setup-node@v4
114+
with:
115+
node-version-file: '.nvmrc'
116+
cache: 'yarn'
117+
- uses: actions/[email protected]
118+
with:
119+
path: "."
120+
- name: Install dependencies
121+
run: yarn install --frozen-lockfile
122+
env:
123+
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
124+
shell: bash
125+
- name: Playwright install deps
126+
run: |-
127+
npx playwright install
128+
sudo npx playwright install-deps
129+
- run: "./scripts/circleci/download_devtools_regression_build.js ${{ matrix.version }}"
130+
- run: "./scripts/circleci/run_devtools_e2e_tests.js ${{ matrix.version }}"
131+
env:
132+
RELEASE_CHANNEL: experimental
133+
- name: Cleanup build regression folder
134+
run: rm -r ./build-regression
135+
- uses: actions/[email protected]
136+
with:
137+
path: tmp/screenshots

0 commit comments

Comments
 (0)