|
54 | 54 | - name: Archive build
|
55 | 55 | uses: actions/upload-artifact@v4
|
56 | 56 | with:
|
57 |
| - name: ${{ matrix.bundle_type }}-${{ matrix.release_channel }} |
| 57 | + name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} |
58 | 58 | path: |
|
59 | 59 | build/**
|
60 | 60 |
|
|
79 | 79 | with:
|
80 | 80 | path: "**/node_modules"
|
81 | 81 | key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
|
| 82 | + - run: yarn install --frozen-lockfile |
82 | 83 | - name: Restore archived build
|
83 | 84 | uses: actions/download-artifact@v4
|
84 | 85 | with:
|
85 |
| - name: ${{ matrix.bundle_type }}-${{ matrix.release_channel }} |
86 |
| - - run: yarn install --frozen-lockfile |
| 86 | + name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} |
| 87 | + path: build |
| 88 | + - name: Display structure of build |
| 89 | + run: ls -R build |
87 | 90 | - run: yarn lint-build
|
| 91 | + |
| 92 | + test_build: |
| 93 | + name: yarn test-build |
| 94 | + needs: build |
| 95 | + strategy: |
| 96 | + matrix: |
| 97 | + test_params: [ |
| 98 | + # Intentionally passing these as strings instead of creating a |
| 99 | + # separate parameter per CLI argument, since it's easier to |
| 100 | + # control/see which combinations we want to run. |
| 101 | + -r=stable --env=development, |
| 102 | + -r=stable --env=production, |
| 103 | + -r=experimental --env=development, |
| 104 | + -r=experimental --env=production, |
| 105 | + |
| 106 | + # Dev Tools |
| 107 | + --project=devtools -r=experimental, |
| 108 | + |
| 109 | + # TODO: Update test config to support www build tests |
| 110 | + # - "-r=www-classic --env=development --variant=false" |
| 111 | + # - "-r=www-classic --env=production --variant=false" |
| 112 | + # - "-r=www-classic --env=development --variant=true" |
| 113 | + # - "-r=www-classic --env=production --variant=true" |
| 114 | + # - "-r=www-modern --env=development --variant=false" |
| 115 | + # - "-r=www-modern --env=production --variant=false" |
| 116 | + # - "-r=www-modern --env=development --variant=true" |
| 117 | + # - "-r=www-modern --env=production --variant=true" |
| 118 | + |
| 119 | + # TODO: Update test config to support xplat build tests |
| 120 | + # - "-r=xplat --env=development --variant=false" |
| 121 | + # - "-r=xplat --env=development --variant=true" |
| 122 | + # - "-r=xplat --env=production --variant=false" |
| 123 | + # - "-r=xplat --env=production --variant=true" |
| 124 | + |
| 125 | + # TODO: Test more persistent configurations? |
| 126 | + ] |
| 127 | + runs-on: ubuntu-latest |
| 128 | + steps: |
| 129 | + - uses: actions/checkout@v4 |
| 130 | + - uses: actions/setup-node@v4 |
| 131 | + with: |
| 132 | + node-version: 18.x |
| 133 | + cache: "yarn" |
| 134 | + cache-dependency-path: yarn.lock |
| 135 | + - name: Restore cached node_modules |
| 136 | + uses: actions/cache@v4 |
| 137 | + id: node_modules |
| 138 | + with: |
| 139 | + path: "**/node_modules" |
| 140 | + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} |
| 141 | + - run: yarn install --frozen-lockfile |
| 142 | + - name: Restore archived build |
| 143 | + uses: actions/download-artifact@v4 |
| 144 | + with: |
| 145 | + path: build |
| 146 | + merge-multiple: true |
| 147 | + - name: Display structure of build |
| 148 | + run: ls -R build |
| 149 | + - run: yarn test --build ${{ matrix.test_params }} --ci=github |
| 150 | + |
0 commit comments