mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
The first job was just printing static JSON. This simplifies the job config a bit and allows the test jobs to start earlier.
58 lines
2.0 KiB
YAML
58 lines
2.0 KiB
YAML
name: (Runtime) Test
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'compiler/**'
|
|
|
|
jobs:
|
|
test:
|
|
name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
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"
|
|
shard:
|
|
- 1/5
|
|
- 2/5
|
|
- 3/5
|
|
- 4/5
|
|
- 5/5
|
|
continue-on-error: true
|
|
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=github --shard=${{ matrix.shard }}
|