Skip to content

Commit

Permalink
fix: ci bash script error
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Jun 2, 2023
1 parent d40c011 commit 65e9461
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,19 @@ jobs:
- name: Run commands in parallel
run: |
pids=()
# list of commands to be run on main has env flag NX_CLOUD_DISTRIBUTED_EXECUTION set to false
NX_CLOUD_DISTRIBUTED_EXECUTION=false pnpm nx-cloud record -- pnpm nx format:check & pids+=($!)
pnpm nx affected -t build --parallel=3 &
pids+=($!)
pnpm nx affected -t lint --parallel=3 &
pids+=($!)
pnpm nx affected -t test:coverage --parallel=3 &
pids+=($!)
pnpm nx affected -t build-storybook --parallel=3 &
pids+=($!)
pnpm nx affected -t build --parallel=3 & pids+=($!)
pnpm nx affected -t lint --parallel=3 & pids+=($!)
pnpm nx affected -t test:coverage --parallel=3 & pids+=($!)
pnpm nx affected -t build-storybook --parallel=3 & pids+=($!)
# run all commands in parallel and bail if one of them fails
for pid in \${pids[*]}; do
for pid in "${pids[@]}"; do
if ! wait $pid; then
echo "Process $pid failed"
exit 1
fi
done
Expand Down

0 comments on commit 65e9461

Please sign in to comment.