chore(repo): run e2e tests in parallel to lint and test (#11684)

This commit is contained in:
Miroslav Jonaš 2022-08-23 14:44:13 +02:00 committed by GitHub
parent e2c4c5490c
commit c8c9efab62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,26 +180,25 @@ jobs:
command: npx nx-cloud record yarn documentation command: npx nx-cloud record yarn documentation
no_output_timeout: 20m no_output_timeout: 20m
- run: - run:
name: Run Lint/Test/Build name: Run Lint/Test/Build/E2E
no_output_timeout: 45m
command: | command: |
pids=() pids=()
npx nx-cloud record yarn nx workspace-lint & (yarn nx affected --target=build --base=$NX_BASE --head=$NX_HEAD --parallel=3 && npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --exclude=e2e-storybook,e2e-storybook-angular,e2e-react-native,e2e-detox,e2e-make-angular-cli-faster --parallel=1) &
pids+=($!) pids+=($!)
yarn nx affected --target=lint --base=$NX_BASE --head=$NX_HEAD --parallel=3 & (npx nx-cloud record yarn nx workspace-lint && yarn nx affected --target=lint --base=$NX_BASE --head=$NX_HEAD --parallel=3) &
pids+=($!) pids+=($!)
yarn nx affected --target=test --base=$NX_BASE --head=$NX_HEAD --parallel=1 & yarn nx affected --target=test --base=$NX_BASE --head=$NX_HEAD --parallel=1 &
pids+=($!) pids+=($!)
yarn nx affected --target=build --base=$NX_BASE --head=$NX_HEAD --parallel=3 &
pids+=($!)
for pid in "${pids[@]}"; do for pid in "${pids[@]}"; do
wait "$pid" wait "$pid"
done done
- run: - run:
name: Run E2E Tests name: Stop All Running Agents for This CI Run
command: | command: npx nx-cloud stop-all-agents
npx nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --exclude=e2e-storybook,e2e-storybook-angular,e2e-react-native,e2e-detox,e2e-make-angular-cli-faster --parallel=1 when: always
no_output_timeout: 45m
# ------------------------- # -------------------------
# JOBS: Main-MacOS # JOBS: Main-MacOS
# ------------------------- # -------------------------