From 096503eb5a80815f594cbec2068050648a1fe5ca 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 | 2 +- .nx/workflows/agents.yaml | 2 +- .nx/workflows/distribution-config.yaml | 21 +++++++++++++++++++++ .nx/workflows/dynamic-changesets.yaml | 4 ---- nx.json | 6 ++++-- 5 files changed, 27 insertions(+), 8 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..13aa98ef 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 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..2a2247a0 --- /dev/null +++ b/.nx/workflows/distribution-config.yaml @@ -0,0 +1,21 @@ +distribute-on: + small-changeset: 2 linux-large-js, 4 linux-medium-js-java-flutter, 2 linux-medium-js + medium-changeset: 3 linux-large-js, 6 linux-medium-js-java-flutter, 5 linux-medium-js + large-changeset: 4 linux-large-js, 8 linux-medium-js-java-flutter, 8 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 diff --git a/nx.json b/nx.json index 855f2097..83a5ee4b 100644 --- a/nx.json +++ b/nx.json @@ -111,7 +111,8 @@ "plugin": "@nx/jest/plugin", "options": { "targetName": "e2e", - "ciTargetName": "e2e-ci" + "ciTargetName": "e2e-ci", + "disableJestRuntime": false }, "include": [ "e2e/nx-flutter-e2e/**/*", @@ -127,7 +128,8 @@ "plugin": "@nx/jest/plugin", "options": { "targetName": "test", - "ciTargetName": "test-ci" + "ciTargetName": "test-ci", + "disableJestRuntime": false }, "include": [ "packages/common/**/*",