From f769ab37ced10ce5f84d222068e5e309bf23f8fa Mon Sep 17 00:00:00 2001 From: Tine Kondo Date: Sun, 15 Dec 2024 22:34:59 +0000 Subject: [PATCH] chore: fix ci (remove parallel) and update agents config --- .github/workflows/ci.yml | 4 ++-- .nx/workflows/agents.yaml | 2 +- .nx/workflows/distribution-config.yaml | 21 +++++++++++++++++++++ .nx/workflows/dynamic-changesets.yaml | 4 ---- 4 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 .nx/workflows/distribution-config.yaml delete mode 100644 .nx/workflows/dynamic-changesets.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14d4e69c..7ac96cb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: # Connect your workspace on nx.app and uncomment this to enable task distribution. # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e" targets have been requested - - run: pnpm exec nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" --stop-agents-after="e2e-ci" --with-env-vars="ANDROID_SDK_VERSION,FLUTTER_VERSION,JDK_VERSION" + - run: pnpm exec nx-cloud start-ci-run --distribute-on=".nx/workflows/distribution-config.yaml" --stop-agents-after="e2e-ci" --with-env-vars="ANDROID_SDK_VERSION,FLUTTER_VERSION,JDK_VERSION" # This line is needed for nx affected to work when CI is running on a PR - run: git branch --track develop origin/develop || exit 0 @@ -46,4 +46,4 @@ jobs: main-branch-name: 'develop' - run: pnpm exec nx-cloud record -- nx format:check - - run: pnpm exec nx affected -t lint test build e2e-ci --parallel=5 --exclude=smoke + - run: pnpm exec nx affected -t lint test-ci build e2e-ci --exclude=smoke diff --git a/.nx/workflows/agents.yaml b/.nx/workflows/agents.yaml index 892a2850..4207d60d 100644 --- a/.nx/workflows/agents.yaml +++ b/.nx/workflows/agents.yaml @@ -1,6 +1,6 @@ launch-templates: linux-medium-js-java-flutter: - resource-class: 'docker_linux_amd64/large' + resource-class: 'docker_linux_amd64/medium+' image: 'ubuntu22.04-node20.11-v10' init-steps: - name: Checkout diff --git a/.nx/workflows/distribution-config.yaml b/.nx/workflows/distribution-config.yaml new file mode 100644 index 00000000..551ba2fc --- /dev/null +++ b/.nx/workflows/distribution-config.yaml @@ -0,0 +1,21 @@ +distribute-on: + small-changeset: 1 linux-medium-js-java-flutter, 1 linux-large-js, 1 linux-medium-js + medium-changeset: 2 linux-medium-js-java-flutter, 2 linux-large-js, 3 linux-medium-js + large-changeset: 3 linux-medium-js-java-flutter, 3 linux-large-js, 5 linux-medium-js + +assignment-rules: + - target: build + runs-on: + - linux-large-js + + - target: e2e + runs-on: + - linux-medium-js-java-flutter + + - target: test + runs-on: + - linux-medium-js + + - target: lint + runs-on: + - linux-medium-js diff --git a/.nx/workflows/dynamic-changesets.yaml b/.nx/workflows/dynamic-changesets.yaml deleted file mode 100644 index 9aaa86b0..00000000 --- a/.nx/workflows/dynamic-changesets.yaml +++ /dev/null @@ -1,4 +0,0 @@ -distribute-on: - small-changeset: 3 linux-medium-js-java-flutter - medium-changeset: 6 linux-medium-js-java-flutter - large-changeset: 10 linux-medium-js-java-flutter