@samitouri / QOS-React / commits / 28c1336c91

[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: https://github.com/facebook/react/pull/30032

Lauren Tan committed Jun 22, 2024 at 12:33 UTC 28c1336c9105c134cba04ed937efcbe391b5979b
1 file changed +55
.github/workflows/runtime_test.yml new
+55
@@ -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