feat(repl): Lynx REPL — interactive playground with GitHub Pages deployment #12855
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/*.md" | |
| merge_group: | |
| types: [checks_requested] | |
| permissions: | |
| repository-projects: read | |
| contents: read | |
| statuses: read | |
| env: | |
| CI: 1 | |
| TURBO_TELEMETRY_DISABLED: 1 | |
| concurrency: | |
| group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| benchmark: | |
| needs: build | |
| uses: ./.github/workflows/workflow-bench.yml | |
| build: | |
| uses: ./.github/workflows/workflow-build.yml | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| bundle-analysis: | |
| needs: build | |
| uses: ./.github/workflows/workflow-bundle-analysis.yml | |
| code-style-check: | |
| runs-on: lynx-ubuntu-24.04-medium | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| with: | |
| # We need full history for changeset status check | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 | |
| with: | |
| node-version: "24" | |
| package-manager-cache: false | |
| - name: Install | |
| run: | | |
| npm install -g corepack@latest | |
| corepack enable | |
| pnpm install --frozen-lockfile | |
| - name: Code Style Check | |
| run: | | |
| pnpm dprint check | |
| pnpm biome check | |
| - name: API Check | |
| run: pnpm turbo api-extractor | |
| - name: Changeset Check | |
| run: pnpm changeset status --since=origin/main | |
| eslint: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| permissions: {} | |
| with: | |
| runs-on: lynx-ubuntu-24.04-medium | |
| run: pnpm eslint . --flag v10_config_lookup_from_file | |
| lighthouse: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| permissions: | |
| statuses: write | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | |
| with: | |
| runs-on: lynx-custom-container | |
| is-web: true | |
| run: | | |
| export NODE_OPTIONS="--max-old-space-size=32768" | |
| pnpm --filter @lynx-js/web-tests run lh || echo "Lighthouse failed" | |
| playwright-web-elements: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2] | |
| name: Playwright Web Elements Test (${{ matrix.shard }}/2) | |
| with: | |
| runs-on: lynx-custom-container | |
| is-web: true | |
| codecov-flags: "e2e" | |
| web-report-path: "packages/web-platform/web-elements/playwright-report" | |
| run: | | |
| export NODE_OPTIONS="--max-old-space-size=32768" | |
| export PLAYWRIGHT_JUNIT_OUTPUT_NAME=test-report.junit.xml | |
| pnpm --filter @lynx-js/web-elements run test --reporter='github,dot,junit,html' --shard=${{ matrix.shard }}/2 | |
| pnpm --filter @lynx-js/web-elements run coverage:ci | |
| playwright-linux: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| name: Playwright ${{ matrix.thread }}-${{ matrix.render }} (${{ matrix.shard }}/3) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| thread: [ALL_ON_UI] | |
| render: [SSR, CSR] | |
| shard: [1, 2, 3] | |
| # exclude: | |
| # - thread: MULTI_THREAD | |
| # render: SSR | |
| with: | |
| runs-on: lynx-custom-container | |
| is-web: true | |
| web-report-name: "playwright-${{ matrix.thread }}-${{ matrix.render }}-shard${{ matrix.shard }}" | |
| codecov-flags: "e2e" | |
| run: | | |
| if [ "${{ matrix.thread }}" = "MULTI_THREAD" ]; then | |
| export ENABLE_MULTI_THREAD=true | |
| fi | |
| if [ "${{ matrix.render }}" = "SSR" ]; then | |
| export ENABLE_SSR=true | |
| fi | |
| export NODE_OPTIONS="--max-old-space-size=32768" | |
| export PLAYWRIGHT_JUNIT_OUTPUT_NAME=test-report.junit.xml | |
| pnpm --filter @lynx-js/web-tests run test --reporter='github,dot,junit,html' --shard=${{ matrix.shard }}/3 | |
| pnpm --filter @lynx-js/web-tests run coverage:ci | |
| web-core-wasm-e2e: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| name: Playwright ${{ matrix.render }} (${{ matrix.shard }}/2) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| render: [CSR] | |
| shard: [1, 2] | |
| with: | |
| runs-on: lynx-custom-container | |
| is-web: true | |
| web-report-name: "playwright-${{ matrix.render }}-shard${{ matrix.shard }}" | |
| web-report-path: "packages/web-platform/web-core-wasm-e2e/playwright-report" | |
| codecov-flags: "e2e" | |
| run: | | |
| if [ "${{ matrix.render }}" = "SSR" ]; then | |
| export ENABLE_SSR=true | |
| fi | |
| export NODE_OPTIONS="--max-old-space-size=32768" | |
| export PLAYWRIGHT_JUNIT_OUTPUT_NAME=test-report.junit.xml | |
| pnpm --filter @lynx-js/web-core-wasm-e2e run test --reporter='github,dot,junit,html' --shard=${{ matrix.shard }}/2 | |
| test-api: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| with: | |
| runs-on: lynx-ubuntu-24.04-medium | |
| run: | | |
| pnpm turbo api-extractor -- --local | |
| if test "$(git diff -- './packages/**/*.api.md' --name-only | wc -l)" -gt 0 ; then | |
| echo "::error::API Report Changes Detected" | |
| echo "The following API reports have changed:" | |
| git diff -- './packages/**/*.api.md' --name-only | |
| echo "::error::Please run 'turbo api-extractor -- --local' to update them." | |
| echo "" | |
| exit 1; | |
| fi | |
| git add --intent-to-add . | |
| if test "$(git diff -- './packages/**/*.api.md' --name-only | wc -l)" -gt 0 ; then | |
| echo "::error::API Report Changes Detected" | |
| echo "The following API reports have changed:" | |
| git diff -- './packages/**/*.api.md' --name-only | |
| echo "::error::Please run 'turbo api-extractor -- --local' to update them." | |
| echo "" | |
| exit 1; | |
| fi | |
| test-publish: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| with: | |
| runs-on: lynx-ubuntu-24.04-medium | |
| run: | | |
| pnpm dlx @pnpm/registry-mock@4 prepare | |
| pnpm dlx @pnpm/registry-mock@4 & | |
| printf '\n//localhost:4873/:_authToken="this-is-a-fake-token"\n' >> ~/.npmrc | |
| pnpm changeset version --snapshot regression | |
| node packages/tools/canary-release/snapshot.js | |
| pnpm --recursive publish --no-git-checks --access public --registry=http://localhost:4873 | |
| cd `mktemp -d` | |
| npx --registry http://localhost:4873 create-rspeedy-canary@latest --template react --dir create-rspeedy-regression --tools eslint | |
| cd create-rspeedy-regression | |
| npx --registry http://localhost:4873 upgrade-rspeedy-canary@latest | |
| pnpm install --registry=http://localhost:4873 | |
| pnpm run build | |
| pnpm run build --mode development | |
| pnpm run lint | |
| cd `mktemp -d` | |
| npx --registry http://localhost:4873 create-rspeedy-canary@latest --template react-vitest-rltl --dir create-rspeedy-regression-vitest-rltl --tools eslint | |
| cd create-rspeedy-regression-vitest-rltl | |
| npx --registry http://localhost:4873 upgrade-rspeedy-canary@latest | |
| pnpm install --registry=http://localhost:4873 | |
| pnpm run build | |
| pnpm run build --mode development | |
| pnpm run lint | |
| pnpm run test | |
| test-react: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| runs-on: lynx-ubuntu-24.04-medium | |
| run: > | |
| pnpm | |
| --filter @lynx-js/react-runtime | |
| --filter @lynx-js/react-worklet-runtime | |
| --filter @lynx-js/react-transform | |
| run test | |
| --reporter=github-actions | |
| --reporter=dot | |
| --reporter=junit | |
| --outputFile=test-report.junit.xml | |
| --coverage.reporter='json' | |
| --coverage.reporter='text' | |
| --testTimeout=50000 | |
| --no-cache | |
| --logHeapUsage | |
| --silent | |
| test-rust: | |
| uses: ./.github/workflows/rust.yml | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| test-type: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| runs-on: lynx-ubuntu-24.04-medium | |
| run: pnpm -r run test:type | |
| test-typos: | |
| runs-on: lynx-ubuntu-24.04-medium | |
| steps: | |
| - uses: taiki-e/checkout-action@3ab630d442e198ebb0ca30872832406ca01c46eb # v1.4.0 | |
| - uses: crate-ci/typos@57b11c6b7e54c402ccd9cda953f1072ec4f78e33 # v1.43.5 | |
| with: | |
| files: . | |
| test-vitest: | |
| needs: build | |
| uses: ./.github/workflows/workflow-test.yml | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: | |
| - name: Ubuntu | |
| label: lynx-ubuntu-24.04-medium | |
| - name: Windows | |
| label: lynx-windows-2022-large-verify | |
| name: Vitest (${{ matrix.runs-on.name }}) | |
| secrets: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| runs-on: ${{ matrix.runs-on.label }} | |
| run: > | |
| pnpm run test | |
| --reporter=github-actions | |
| --reporter=dot | |
| --reporter=junit | |
| --outputFile=test-report.junit.xml | |
| --expect.poll.timeout=5000 | |
| --testTimeout=50000 | |
| --hookTimeout=50000 | |
| --coverage | |
| --coverage.reporter='json' | |
| --coverage.reporter='text' | |
| --no-cache | |
| --logHeapUsage | |
| --silent | |
| website: | |
| needs: build | |
| uses: ./.github/workflows/workflow-website.yml | |
| done: | |
| needs: | |
| - benchmark | |
| - code-style-check | |
| - eslint | |
| - playwright-linux | |
| - playwright-web-elements | |
| - test-api | |
| - test-publish | |
| - test-react | |
| - test-rust | |
| - test-type | |
| - test-typos | |
| - test-vitest | |
| - web-core-wasm-e2e | |
| - website | |
| if: always() | |
| runs-on: ubuntu-latest | |
| name: Done | |
| steps: | |
| - run: exit 1 | |
| if: ${{ always() && (contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')) }} |