Skip to content

Commit 5bf943f

Browse files
committed
[ci] Add yarn_test_build job to gh actions
ghstack-source-id: c1bf83b54925954be64274bac3595acbb68f0d23 Pull Request resolved: #30072
1 parent 850185d commit 5bf943f

File tree

3 files changed

+75
-8
lines changed

3 files changed

+75
-8
lines changed

Diff for: .github/workflows/runtime_build.yml

+72-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
id: define_release_channels
2727
with:
2828
script: |
29-
return ['stable', 'experimental'];
29+
return ["stable", "experimental"];
3030
3131
build:
3232
name: yarn build
@@ -51,12 +51,14 @@ jobs:
5151
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
5252
- run: yarn install --frozen-lockfile
5353
- run: yarn build --b=${{ matrix.bundle_type }} --r=${{ matrix.release_channel }} --ci=github
54+
- name: Display structure of build
55+
run: ls -R build
5456
- name: Archive build
5557
uses: actions/upload-artifact@v4
5658
with:
57-
name: ${{ matrix.bundle_type }}-${{ matrix.release_channel }}
59+
name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }}
5860
path: |
59-
build/**
61+
build
6062
6163
lint_build:
6264
name: yarn lint-build
@@ -65,6 +67,7 @@ jobs:
6567
matrix:
6668
bundle_type: ${{ fromJSON(needs.define_build_params.outputs.bundle_type) }}
6769
release_channel: ${{ fromJSON(needs.define_build_params.outputs.release_channel) }}
70+
continue-on-error: true
6871
runs-on: ubuntu-latest
6972
steps:
7073
- uses: actions/checkout@v4
@@ -79,9 +82,73 @@ jobs:
7982
with:
8083
path: "**/node_modules"
8184
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
85+
- run: yarn install --frozen-lockfile
8286
- name: Restore archived build
8387
uses: actions/download-artifact@v4
8488
with:
85-
name: ${{ matrix.bundle_type }}-${{ matrix.release_channel }}
86-
- run: yarn install --frozen-lockfile
89+
name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }}
90+
path: build
91+
- name: Display structure of build
92+
run: ls -R build
8793
- run: yarn lint-build
94+
95+
test_build:
96+
name: yarn test-build
97+
needs: build
98+
strategy:
99+
matrix:
100+
test_params: [
101+
# Intentionally passing these as strings instead of creating a
102+
# separate parameter per CLI argument, since it's easier to
103+
# control/see which combinations we want to run.
104+
-r=stable --env=development,
105+
-r=stable --env=production,
106+
-r=experimental --env=development,
107+
-r=experimental --env=production,
108+
109+
# Dev Tools
110+
--project=devtools -r=experimental,
111+
112+
# TODO: Update test config to support www build tests
113+
# - "-r=www-classic --env=development --variant=false"
114+
# - "-r=www-classic --env=production --variant=false"
115+
# - "-r=www-classic --env=development --variant=true"
116+
# - "-r=www-classic --env=production --variant=true"
117+
# - "-r=www-modern --env=development --variant=false"
118+
# - "-r=www-modern --env=production --variant=false"
119+
# - "-r=www-modern --env=development --variant=true"
120+
# - "-r=www-modern --env=production --variant=true"
121+
122+
# TODO: Update test config to support xplat build tests
123+
# - "-r=xplat --env=development --variant=false"
124+
# - "-r=xplat --env=development --variant=true"
125+
# - "-r=xplat --env=production --variant=false"
126+
# - "-r=xplat --env=production --variant=true"
127+
128+
# TODO: Test more persistent configurations?
129+
]
130+
continue-on-error: true
131+
runs-on: ubuntu-latest
132+
steps:
133+
- uses: actions/checkout@v4
134+
- uses: actions/setup-node@v4
135+
with:
136+
node-version: 18.x
137+
cache: "yarn"
138+
cache-dependency-path: yarn.lock
139+
- name: Restore cached node_modules
140+
uses: actions/cache@v4
141+
id: node_modules
142+
with:
143+
path: "**/node_modules"
144+
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
145+
- run: yarn install --frozen-lockfile
146+
- name: Restore archived build
147+
uses: actions/download-artifact@v4
148+
with:
149+
path: build
150+
merge-multiple: true
151+
- name: Display structure of build
152+
run: ls -R build
153+
- run: yarn test --build ${{ matrix.test_params }} --ci=github
154+

Diff for: packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js

+2
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,8 @@ describe('StoreStressConcurrent', () => {
829829

830830
// @reactVersion >= 18.0
831831
it('should handle a stress test for Suspense without type change (Concurrent Mode)', async () => {
832+
jest.setTimeout(15000);
833+
832834
const A = () => 'a';
833835
const B = () => 'b';
834836
const C = () => 'c';

Diff for: scripts/rollup/build-ghaction.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -846,9 +846,7 @@ async function buildEverything(bundleTypeToBuild) {
846846
);
847847

848848
await Promise.all(
849-
bundles.map(([bundle, bundleType]) => {
850-
return createBundle(bundle, bundleType);
851-
})
849+
bundles.map(([bundle, bundleType]) => createBundle(bundle, bundleType))
852850
);
853851

854852
await Packaging.copyAllShims();

0 commit comments

Comments
 (0)