From 1f1da12ce7767cb5f89a2119c4d4aac5bca524e3 Mon Sep 17 00:00:00 2001 From: Nex Zhu Date: Thu, 21 Dec 2023 18:03:10 +0800 Subject: [PATCH] ci(root): use @traf/nx calculated affected packages with "nx run-many" instead of "nx affected" --- .github/workflows/ci.yml | 4 ++-- package.json | 2 +- pnpm-lock.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a55dd46..0f157a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: nx affected + - name: Nx env: INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} INPUT_BUILDER: ${{ steps.docker-setup-buildx.outputs.name }} @@ -96,4 +96,4 @@ jobs: if [ '${{ github.ref }}' = 'refs/heads/main' ] && [ '${{ github.event_name }}' = 'push' ] && [ '${{ matrix.node-version }}' = '20.x' ]; then targets="${targets} container" fi - pnpm nx affected -t ${targets} -c ci --parallel 20 --batch + pnpm nx run-many -p ${{ steps.affected.outputs.projs }} -t ${targets} -c ci --parallel 20 --batch diff --git a/package.json b/package.json index 345db5e..43af8b2 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@nx/vite": "v17.2.5", "@swc-node/register": "~1.6.8", "@swc/core": "~1.3.101", - "@traf/nx": "npm:@daotl/traf-nx@^0.0.17", + "@traf/nx": "npm:@daotl/traf-nx@^0.0.17-0", "@tsconfig/esm": "^1.0.5", "@tsconfig/node20": "^20.1.2", "@tsconfig/strictest": "^2.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0cf7ea1..f1f95fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,7 +45,7 @@ importers: specifier: ~1.3.101 version: 1.3.101 '@traf/nx': - specifier: npm:@daotl/traf-nx@^0.0.17 + specifier: npm:@daotl/traf-nx@^0.0.17-0 version: /@daotl/traf-nx@0.0.17 '@tsconfig/esm': specifier: ^1.0.5