From 724d4ae231397eda9f647f46abfa352180118523 Mon Sep 17 00:00:00 2001 From: Kilian Panot Date: Tue, 12 Nov 2024 15:55:25 +0900 Subject: [PATCH] feat: nx agent for IT tests --- .github/workflows/it-tests.yml | 3 ++- .github/workflows/main.yml | 2 -- package.json | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/it-tests.yml b/.github/workflows/it-tests.yml index 48b1f89161..0f49ab6b3f 100644 --- a/.github/workflows/it-tests.yml +++ b/.github/workflows/it-tests.yml @@ -69,6 +69,7 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: ./tools/github-actions/download-build-output - uses: ./tools/github-actions/setup + - run: npx nx-cloud@latest start-ci-run -- --distribute-on="3 linux-medium-js" --stop-agents-after="test-int" - shell: bash run: | git config --global user.name "GitHub Actions" @@ -109,7 +110,7 @@ jobs: shell: bash - name: Test id: it-tests - run: yarn test-int --collectCoverage + run: yarn test-int:affected --collectCoverage - name: Upload results to Codecov uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9fb7da07ab..c1247832ca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,8 +27,6 @@ jobs: # Check the integrity of yarn lock yarn_lock_check: runs-on: ubuntu-latest - env: - NX_SKIP_NX_CACHE: true steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: ./tools/github-actions/setup diff --git a/package.json b/package.json index 6600284e9f..562e7a2546 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "test:affected": "yarn nx affected --target=test --parallel $(yarn get:cpus-number) --cacheDirectory=$(yarn get:current-dir)/.cache/jest", "test-e2e": "yarn nx run-many --target=test-e2e --parallel $(yarn get:cpus-number)", "test-int": "yarn nx run-many --target=test-int --parallel $(yarn get:cpus-number)", + "test-int:affected": "yarn nx affected --target=test-int", "postinstall": "husky && yarn build:lint && yarn harmonize:version && yarn update-yarn-sdks", "update-yarn-sdks": "node -e \"'pnp' !== '$(yarn config get nodeLinker)' || process.exit(1)\" || yarn dlx @yarnpkg/sdks", "build:storybook": "yarn doc:generate:json && yarn ng run storybook:extract-style && build-storybook",