-
Notifications
You must be signed in to change notification settings - Fork 47.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: React Runtime (Test) | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
paths-ignore: | ||
- 'compiler/**' | ||
|
||
jobs: | ||
test: | ||
name: yarn test | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
# Intentionally passing these as strings instead of creating a | ||
# separate parameter per CLI argument, since it's easier to | ||
# control/see which combinations we want to run. | ||
params: [ | ||
"-r=stable --env=development", | ||
"-r=stable --env=production", | ||
"-r=experimental --env=development", | ||
"-r=experimental --env=production", | ||
"-r=www-classic --env=development --variant=false", | ||
"-r=www-classic --env=production --variant=false", | ||
"-r=www-classic --env=development --variant=true", | ||
"-r=www-classic --env=production --variant=true", | ||
"-r=www-modern --env=development --variant=false", | ||
"-r=www-modern --env=production --variant=false", | ||
"-r=www-modern --env=development --variant=true", | ||
"-r=www-modern --env=production --variant=true", | ||
"-r=xplat --env=development --variant=false", | ||
"-r=xplat --env=development --variant=true", | ||
"-r=xplat --env=production --variant=false", | ||
"-r=xplat --env=production --variant=true", | ||
# TODO: Test more persistent configurations? | ||
"-r=stable --env=development --persistent", | ||
"-r=experimental --env=development --persistent" | ||
] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
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 | ||
- run: yarn test ${{ matrix.params }} --ci |