Skip to content

Commit 28c1336

Browse files
committed
[ci] Add new yarn test GitHub action
Copies the existing circleci workflow for yarn test into GitHub actions. I didn't remove the circleci job for now just to check for parity. Opted to keep the same hardcoded list of params rather than use GitHub's matrix permutations since this was intentional in the circleci config. ghstack-source-id: b77a091254f402364c0b9de871889683fa3ee7c8 Pull Request resolved: #30032
1 parent 454fb35 commit 28c1336

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/runtime_test.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: React Runtime (Test)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
paths-ignore:
8+
- 'compiler/**'
9+
10+
jobs:
11+
test:
12+
name: yarn test
13+
runs-on: ubuntu-latest
14+
continue-on-error: true
15+
strategy:
16+
matrix:
17+
# Intentionally passing these as strings instead of creating a
18+
# separate parameter per CLI argument, since it's easier to
19+
# control/see which combinations we want to run.
20+
params: [
21+
"-r=stable --env=development",
22+
"-r=stable --env=production",
23+
"-r=experimental --env=development",
24+
"-r=experimental --env=production",
25+
"-r=www-classic --env=development --variant=false",
26+
"-r=www-classic --env=production --variant=false",
27+
"-r=www-classic --env=development --variant=true",
28+
"-r=www-classic --env=production --variant=true",
29+
"-r=www-modern --env=development --variant=false",
30+
"-r=www-modern --env=production --variant=false",
31+
"-r=www-modern --env=development --variant=true",
32+
"-r=www-modern --env=production --variant=true",
33+
"-r=xplat --env=development --variant=false",
34+
"-r=xplat --env=development --variant=true",
35+
"-r=xplat --env=production --variant=false",
36+
"-r=xplat --env=production --variant=true",
37+
# TODO: Test more persistent configurations?
38+
"-r=stable --env=development --persistent",
39+
"-r=experimental --env=development --persistent"
40+
]
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: actions/setup-node@v4
44+
with:
45+
node-version: 18.x
46+
cache: "yarn"
47+
cache-dependency-path: yarn.lock
48+
- name: Restore cached node_modules
49+
uses: actions/cache@v4
50+
id: node_modules
51+
with:
52+
path: "**/node_modules"
53+
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
54+
- run: yarn install --frozen-lockfile
55+
- run: yarn test ${{ matrix.params }} --ci

0 commit comments

Comments
 (0)