chore(enhanced): adjust add federation init process #1933
Workflow file for this run
This file contains 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 | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Pnpm | |
run: corepack enable | |
- name: Setup Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: 'pnpm' | |
- name: Set Nx SHA | |
uses: nrwl/nx-set-shas@v3 | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Install Cypress | |
run: npx cypress install | |
- name: Check Code Format | |
run: npx nx format:check | |
- name: Run Affected Build | |
run: npx nx affected -t build --parallel=10 --exclude='*,!tag:package' | |
- name: Run Affected Lint | |
run: npx nx affected -t lint --parallel=7 --exclude='*,!tag:package' | |
- name: Run Affected Test | |
run: npx nx affected -t test --parallel=3 --exclude='*,!tag:package' | |
- name: E2E Test for 3000-home | |
run: pnpm run app:next:dev & echo "done" && sleep 20 && npx nx run-many --target=test:e2e --projects=3000-home && lsof -ti tcp:3000,3001,3002 | xargs kill | |
- name: E2E Test for 3001-shop | |
run: pnpm run app:next:dev & echo "done" && sleep 20 && npx nx run-many --target=test:e2e --projects=3001-shop && lsof -ti tcp:3000,3001,3002 | xargs kill | |
# - name: E2E Test for 3002-checkout | |
# run: pnpm run app:next:dev & echo "done" && sleep 15 && npx nx run-many --target=test:e2e --projects=3002-checkout && lsof -ti tcp:3000,3001,3002 | xargs kill | |
- name: E2E Test for 3005-runtime-host | |
run: pnpm run app:runtime:dev & echo "done" && sleep 6 && npx nx run-many --target=test:e2e --projects=3005-runtime-host --parallel=1 && lsof -ti tcp:3005,3006,3007 | xargs kill | |
- name: E2E Test for 3008-webpack-host | |
run: pnpm run app:manifest:dev & echo "done" && sleep 6 && npx nx run-many --target=e2e --projects=3008-webpack-host --parallel=1 && lsof -ti tcp:3008,3009,3010,3011,3012 | xargs kill | |
- name: Build Next.js Apps in Production Mode | |
run: pnpm app:next:build | |
- name: E2E Node Federation | |
run: npx nx run-many --target=serve --projects=node-local-remote,node-remote --parallel=3 & echo "done" && sleep 10 && npx nx run-many --target=serve --projects=node-host & echo "done" && npx nx run node-host-e2e:test:e2e |