Skip to content

fix(bridge-react): remove the unnecessary bundle for react-router-do… #9245

fix(bridge-react): remove the unnecessary bundle for react-router-do…

fix(bridge-react): remove the unnecessary bundle for react-router-do… #9245

name: Build Affected Packages
permissions:
contents: read
on:
pull_request:
branches: [main, '**']
push:
branches: [main]
jobs:
checkout-install:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Cache Tool Downloads
uses: actions/cache@v4
with:
path: ~/.cache
key: ${{ runner.os }}-toolcache-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-toolcache-
- name: Install Pnpm
run: |
corepack prepare [email protected] --activate
corepack enable
- name: Setup Node.js 18
uses: actions/setup-node@v5
with:
node-version: '18'
cache: 'pnpm'
- name: Set Playwright cache status
run: |
if [ -d "$HOME/.cache/ms-playwright" ] || [ -d "$HOME/.cache/Cypress" ]; then
echo "PLAYWRIGHT_CACHE_HIT=true" >> "$GITHUB_ENV"
else
echo "PLAYWRIGHT_CACHE_HIT=false" >> "$GITHUB_ENV"
fi
- name: Set Nx SHA
uses: nrwl/nx-set-shas@v3
- name: Install Dependencies
run: pnpm install
- name: Clear Node Modules Cache
run: find . -maxdepth 6 -type d \( -name ".cache" -o -name ".modern-js" \) -exec rm -rf {} +
- name: Install Cypress
# if: steps.browsers-cache.outputs.cache-hit != 'true'
run: npx cypress install
- name: Check Code Format
run: npx nx format:check
- name: Print Number of CPU Cores
run: nproc
- name: Run Build for All
run: |
npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4 --skip-nx-cache
npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4
- name: Check Package Publishing Compatibility
run: |
for pkg in packages/*; do
if [ -f "$pkg/package.json" ] && \
[ "$pkg" != "packages/assemble-release-plan" ] && \
[ "$pkg" != "packages/chrome-devtools" ] && \
[ "$pkg" != "packages/core" ] && \
[ "$pkg" != "packages/modernjs" ] && \
[ "$pkg" != "packages/utilities" ] && \
[ "$pkg" != "packages/metro-core" ] && \
[ "$pkg" != "packages/metro-plugin-rnef" ] && \
[ "$pkg" != "packages/metro-plugin-rnc-cli" ]; then
echo "Checking $pkg..."
npx publint "$pkg"
fi
done
- name: Warm Nx Cache
run: npx nx run-many --targets=build --projects=tag:type:pkg --parallel=4
- name: Run Affected Test
timeout-minutes: 10
run: npx nx affected -t test --parallel=3 --exclude='*,!tag:type:pkg'
- name: Run Affected Experimental Tests
timeout-minutes: 10
run: npx nx affected -t test:experiments --parallel=1 --exclude='*,!tag:type:pkg' --skip-nx-cache
e2e-modern:
needs: checkout-install
uses: ./.github/workflows/e2e-modern.yml
secrets: inherit
e2e-runtime:
needs: checkout-install
uses: ./.github/workflows/e2e-runtime.yml
secrets: inherit
e2e-manifest:
needs: checkout-install
uses: ./.github/workflows/e2e-manifest.yml
secrets: inherit
e2e-node:
needs: checkout-install
uses: ./.github/workflows/e2e-node.yml
secrets: inherit
e2e-next-dev:
needs: checkout-install
uses: ./.github/workflows/e2e-next-dev.yml
secrets: inherit
e2e-next-prod:
needs: checkout-install
uses: ./.github/workflows/e2e-next-prod.yml
secrets: inherit
e2e-modern-ssr:
needs: checkout-install
uses: ./.github/workflows/e2e-modern-ssr.yml
secrets: inherit
e2e-router:
needs: checkout-install
uses: ./.github/workflows/e2e-router.yml
secrets: inherit
e2e-metro:
permissions:
contents: read
actions: read
checks: write
pull-requests: write
needs:
- checkout-install
- build-metro
uses: ./.github/workflows/e2e-metro.yml
secrets: inherit
build-metro:
uses: ./.github/workflows/build-metro.yml
secrets: inherit