|
64 | 64 | id: rsc-related-changes
|
65 | 65 | uses: ./.github/actions/rsc_related_changes
|
66 | 66 |
|
| 67 | + ssr-related-changes: |
| 68 | + needs: check |
| 69 | + if: github.repository == 'redwoodjs/redwood' |
| 70 | + name: 🌤️ SSR related changes? |
| 71 | + runs-on: ubuntu-latest |
| 72 | + outputs: |
| 73 | + ssr-related-changes: ${{ steps.ssr-related-changes.outputs.ssr-related-changes }} |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v3 |
| 76 | + |
| 77 | + - name: ⬢ Set up Node.js |
| 78 | + uses: actions/setup-node@v3 |
| 79 | + with: |
| 80 | + node-version: 18 |
| 81 | + |
| 82 | + - name: 🐈 Yarn install |
| 83 | + working-directory: ./.github/actions/ssr_related_changes |
| 84 | + run: yarn install --inline-builds |
| 85 | + env: |
| 86 | + GITHUB_TOKEN: ${{ github.token }} |
| 87 | + |
| 88 | + - name: 🌤️ SSR related changes? |
| 89 | + id: ssr-related-changes |
| 90 | + uses: ./.github/actions/ssr_related_changes |
| 91 | + |
67 | 92 | check:
|
68 | 93 | needs: only-doc-changes
|
69 | 94 | if: needs.only-doc-changes.outputs.only-doc-changes == 'false'
|
@@ -232,6 +257,80 @@ jobs:
|
232 | 257 | steps:
|
233 | 258 | - run: echo "Only doc changes"
|
234 | 259 |
|
| 260 | + ssr-smoke-tests: |
| 261 | + needs: ssr-related-changes |
| 262 | + if: needs.ssr-related-changes.outputs.ssr-related-changes == 'true' |
| 263 | + |
| 264 | + strategy: |
| 265 | + matrix: |
| 266 | + os: [ubuntu-latest] |
| 267 | + # [ubuntu-latest, windows-latest] disabled, because windows misbehaving |
| 268 | + # waiting for help from main-man Josh |
| 269 | + |
| 270 | + name: 🔁 SSR Smoke tests / ${{ matrix.os }} |
| 271 | + runs-on: ${{ matrix.os }} |
| 272 | + |
| 273 | + env: |
| 274 | + REDWOOD_CI: 1 |
| 275 | + REDWOOD_VERBOSE_TELEMETRY: 1 |
| 276 | + |
| 277 | + steps: |
| 278 | + - uses: actions/checkout@v3 |
| 279 | + |
| 280 | + - name: ⬢ Set up Node.js |
| 281 | + uses: actions/setup-node@v3 |
| 282 | + with: |
| 283 | + node-version: 18 |
| 284 | + |
| 285 | + - name: 🐈 Set up yarn cache |
| 286 | + uses: ./.github/actions/set-up-yarn-cache |
| 287 | + |
| 288 | + - name: 🐈 Yarn install |
| 289 | + run: yarn install --inline-builds |
| 290 | + env: |
| 291 | + GITHUB_TOKEN: ${{ github.token }} |
| 292 | + |
| 293 | + - name: 🔨 Build |
| 294 | + run: yarn build |
| 295 | + |
| 296 | + - name: 🌲 Set up test project |
| 297 | + id: set-up-test-project |
| 298 | + uses: ./.github/actions/set-up-test-project |
| 299 | + with: |
| 300 | + bundler: vite |
| 301 | + canary: true |
| 302 | + env: |
| 303 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 304 | + YARN_ENABLE_IMMUTABLE_INSTALLS: false |
| 305 | + |
| 306 | + - name: Run SSR codemods on test project |
| 307 | + run: ./tasks/test-project/convert-to-ssr-fixture ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 308 | + env: |
| 309 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 310 | + |
| 311 | + - name: 🎭 Install playwright dependencies |
| 312 | + run: npx playwright install --with-deps chromium |
| 313 | + |
| 314 | + - name: Run SSR [DEV] smoke tests |
| 315 | + working-directory: ./tasks/smoke-tests/streaming-ssr-dev |
| 316 | + run: npx playwright test |
| 317 | + env: |
| 318 | + REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}' |
| 319 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 320 | + |
| 321 | + - name: Build for production |
| 322 | + working-directory: ${{ steps.set-up-test-project.outputs.test-project-path }} |
| 323 | + run: yarn rw build --no-prerender |
| 324 | + env: |
| 325 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 326 | + |
| 327 | + - name: Run SSR [PROD] smoke tests |
| 328 | + working-directory: ./tasks/smoke-tests/streaming-ssr-prod |
| 329 | + run: npx playwright test |
| 330 | + env: |
| 331 | + REDWOOD_TEST_PROJECT_PATH: '${{ steps.set-up-test-project.outputs.test-project-path }}' |
| 332 | + REDWOOD_DISABLE_TELEMETRY: 1 |
| 333 | + |
235 | 334 | smoke-tests:
|
236 | 335 | needs: check
|
237 | 336 |
|
|
0 commit comments