|
46 | 46 | path: |
|
47 | 47 | build
|
48 | 48 |
|
| 49 | + test_build: |
| 50 | + name: yarn test-build |
| 51 | + needs: build_and_lint |
| 52 | + strategy: |
| 53 | + matrix: |
| 54 | + test_params: [ |
| 55 | + # Intentionally passing these as strings instead of creating a |
| 56 | + # separate parameter per CLI argument, since it's easier to |
| 57 | + # control/see which combinations we want to run. |
| 58 | + -r=stable --env=development, |
| 59 | + -r=stable --env=production, |
| 60 | + -r=experimental --env=development, |
| 61 | + -r=experimental --env=production, |
| 62 | + |
| 63 | + # Dev Tools |
| 64 | + --project=devtools -r=experimental, |
| 65 | + |
| 66 | + # TODO: Update test config to support www build tests |
| 67 | + # - "-r=www-classic --env=development --variant=false" |
| 68 | + # - "-r=www-classic --env=production --variant=false" |
| 69 | + # - "-r=www-classic --env=development --variant=true" |
| 70 | + # - "-r=www-classic --env=production --variant=true" |
| 71 | + # - "-r=www-modern --env=development --variant=false" |
| 72 | + # - "-r=www-modern --env=production --variant=false" |
| 73 | + # - "-r=www-modern --env=development --variant=true" |
| 74 | + # - "-r=www-modern --env=production --variant=true" |
| 75 | + |
| 76 | + # TODO: Update test config to support xplat build tests |
| 77 | + # - "-r=xplat --env=development --variant=false" |
| 78 | + # - "-r=xplat --env=development --variant=true" |
| 79 | + # - "-r=xplat --env=production --variant=false" |
| 80 | + # - "-r=xplat --env=production --variant=true" |
| 81 | + |
| 82 | + # TODO: Test more persistent configurations? |
| 83 | + ] |
| 84 | + continue-on-error: true |
| 85 | + runs-on: ubuntu-latest |
| 86 | + steps: |
| 87 | + - uses: actions/checkout@v4 |
| 88 | + - uses: actions/setup-node@v4 |
| 89 | + with: |
| 90 | + node-version: 18.x |
| 91 | + cache: "yarn" |
| 92 | + cache-dependency-path: yarn.lock |
| 93 | + - name: Restore cached node_modules |
| 94 | + uses: actions/cache@v4 |
| 95 | + id: node_modules |
| 96 | + with: |
| 97 | + path: "**/node_modules" |
| 98 | + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} |
| 99 | + - run: yarn install --frozen-lockfile |
| 100 | + - name: Restore archived build |
| 101 | + uses: actions/download-artifact@v4 |
| 102 | + with: |
| 103 | + path: build |
| 104 | + merge-multiple: true |
| 105 | + - name: Display structure of build |
| 106 | + run: ls -R build |
| 107 | + - run: yarn test --build ${{ matrix.test_params }} --ci=github |
| 108 | + |
49 | 109 | process_artifacts_combined:
|
50 | 110 | name: Process artifacts combined
|
51 | 111 | needs: build_and_lint
|
|
0 commit comments