|
| 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