Skip to content

Commit

Permalink
test: Test v2 against the React Compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
franky47 committed Jun 27, 2024
1 parent dcd970f commit 47926d2
Show file tree
Hide file tree
Showing 5 changed files with 153 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test-against-nextjs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ env:

jobs:
test_against_nextjs_release:
name: CI (${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}})
name: CI (${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.react-compiler && ' ⚛️⚡️' || ''}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
base-path: [false, '/base']
react-compiler: [true, false]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
Expand All @@ -35,6 +36,7 @@ jobs:
run: pnpm run test
env:
BASE_PATH: ${{ matrix.base-path && matrix.base-path || '/' }}
REACT_COMPILER: ${{ matrix.react-compiler }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
E2E_NO_CACHE_ON_RERUN: ${{ github.run_attempt }}
Expand All @@ -43,13 +45,13 @@ jobs:
if: failure()
with:
path: packages/e2e/cypress/screenshots
name: ci-${{ inputs.version }}${{ matrix.base-path && '-basePath' || ''}}
name: ci-${{ inputs.version }}${{ matrix.base-path && '-basePath' || ''}}${{ matrix.react-compiler && '-react-compiler' || ''}}
- uses: 47ng/actions-slack-notify@main
name: Notify on Slack
if: always()
with:
status: ${{ job.status }}
jobName: next@${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}}
jobName: next@${{ inputs.version }}${{ matrix.base-path && ' basePath' || ''}}${{ matrix.react-compiler && ' ⚛️⚡️' || ''}}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Expand Down
3 changes: 2 additions & 1 deletion packages/e2e/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const basePath =
const config = {
basePath,
experimental: {
clientRouterFilter: false
clientRouterFilter: false,
reactCompiler: process.env.REACT_COMPILER === 'true'
},
rewrites: async () => [
{
Expand Down
1 change: 1 addition & 0 deletions packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@types/react-dom": "^18.3.0",
"@types/semver": "^7.5.8",
"@types/webpack": "^5.28.5",
"babel-plugin-react-compiler": "0.0.0-experimental-696af53-20240625",
"cypress": "^13.8.1",
"npm-run-all": "^4.1.5",
"semver": "^7.6.0",
Expand Down
143 changes: 143 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 47926d2

Please sign in to comment.