Skip to content

Commit

Permalink
fix(agora): setup all projects when running agora e2e, not just affec…
Browse files Browse the repository at this point in the history
…ted projects (AG-1623) (#3013)
  • Loading branch information
hallieswan authored Feb 18, 2025
1 parent 1b703e8 commit 0d27def
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/e2e-agora.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
id: agora_affected
run: |
AFFECTED=$(devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx show projects --affected --with-target e2e | grep -q 'agora' && echo 'true' || echo 'false'")
&& nx show projects --affected | grep -q 'agora' && echo 'true' || echo 'false'")
echo "AFFECTED=${AFFECTED}" >> "${GITHUB_OUTPUT}"
- name: Install Playwright Browsers
Expand All @@ -35,6 +35,12 @@ jobs:
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& npx playwright install --with-deps"
- name: Setup Agora
if: steps.agora_affected.outputs.AFFECTED == 'true'
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& bash ./tools/setup-projects.sh agora"
- name: Build Agora
if: steps.agora_affected.outputs.AFFECTED == 'true'
run: |
Expand Down
20 changes: 20 additions & 0 deletions tools/setup-projects.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# Runs tasks to set up all projects for a particular stack.
# $1 - The stack name, e.g. agora.

if [ "$#" -ne 1 ]; then
echo "Please pass the stack name as an argument".
exit
fi

stack="$1"
echo "Running setup tasks for ${stack} projects."

projects="${1}-*"

nx run-many --target=create-config --projects="${projects}"
# Projects that can be prepared in parallel
nx run-many --target=prepare --exclude='tag:language:java' --projects="${projects}"
# Java projects must be installed one at a time
nx run-many --target=prepare --exclude='!tag:language:java' --parallel=1 --projects="${projects}"

0 comments on commit 0d27def

Please # to comment.