feat(enhanced): add alias-aware providing and consuming for shared modules #8855
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: 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: 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: Cache Browsers | |
uses: actions/cache@v3 | |
id: browsers-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
~/.cache/Cypress | |
key: ${{ runner.os }}-browsers-${{ hashFiles('**/pnpm-lock.yaml') }} | |
- name: Set Playwright cache status | |
run: echo "PLAYWRIGHT_CACHE_HIT=${{ steps.browsers-cache.outputs.cache-hit }}" >> $GITHUB_ENV | |
- 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 | |
build-metro: | |
needs: checkout-install | |
uses: ./.github/workflows/build-metro.yml | |
secrets: inherit |