diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4bf204df4..1957cf0aa9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ concurrency: env: NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} jobs: test-and-publish: @@ -36,10 +35,15 @@ jobs: with: node-version-file: .nvmrc cache: pnpm + - name: Start Nx Agents + run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" - name: Install dependencies run: pnpm install --frozen-lockfile --prefer-offline - name: Run Tests - run: pnpm run test:ci + run: pnpm run test:ci --parallel=3 + - name: Stop Nx Agents + if: ${{ always() }} + run: npx nx-cloud stop-all-agents - name: Publish run: | git config --global user.name 'Tanner Linsley' diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index aabd20c46d..569e24df61 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,7 +13,6 @@ concurrency: env: NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} - NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }} jobs: test: @@ -33,6 +32,8 @@ jobs: with: node-version-file: .nvmrc cache: pnpm + - name: Start Nx Agents + run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml" - name: Install dependencies run: pnpm install --frozen-lockfile --prefer-offline - name: Get base and head commits for `nx affected` @@ -40,4 +41,7 @@ jobs: with: main-branch-name: 'main' - name: Run Checks - run: pnpm run test:pr + run: pnpm run test:pr --parallel=3 + - name: Stop Nx Agents + if: ${{ always() }} + run: npx nx-cloud stop-all-agents diff --git a/.gitignore b/.gitignore index 3449f39e03..ce0bd61576 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ # dependencies node_modules +package-lock.json +yarn.lock # builds types @@ -38,9 +40,8 @@ stats.html *.log .DS_Store -node_modules .cache -dist +.pnpm-store ts-perf /examples/*/*/yarn.lock @@ -50,7 +51,7 @@ ts-perf nx-cloud.env .vscode -.nx +.nx/cache gpt/db.json diff --git a/.nx/workflows/dynamic-changesets.yaml b/.nx/workflows/dynamic-changesets.yaml new file mode 100644 index 0000000000..29c58231b2 --- /dev/null +++ b/.nx/workflows/dynamic-changesets.yaml @@ -0,0 +1,4 @@ +distribute-on: + small-changeset: 8 linux-medium-js + medium-changeset: 10 linux-medium-js + large-changeset: 12 linux-medium-js diff --git a/examples/react/kitchen-sink-file-based/src/routes/expensive/index.lazy.tsx b/examples/react/kitchen-sink-file-based/src/routes/expensive/index.lazy.tsx index 74b604d7f1..5ddca58813 100644 --- a/examples/react/kitchen-sink-file-based/src/routes/expensive/index.lazy.tsx +++ b/examples/react/kitchen-sink-file-based/src/routes/expensive/index.lazy.tsx @@ -2,5 +2,5 @@ import { createLazyFileRoute } from '@tanstack/react-router' import Expensive from './-components/Expensive' export const Route = createLazyFileRoute('/expensive/')({ - component: () => Expensive + component: () => Expensive, }) diff --git a/examples/react/kitchen-sink-react-query-file-based/src/routes/expensive/index.lazy.tsx b/examples/react/kitchen-sink-react-query-file-based/src/routes/expensive/index.lazy.tsx index ae48076cc3..33b99dfa54 100644 --- a/examples/react/kitchen-sink-react-query-file-based/src/routes/expensive/index.lazy.tsx +++ b/examples/react/kitchen-sink-react-query-file-based/src/routes/expensive/index.lazy.tsx @@ -2,5 +2,5 @@ import { createLazyFileRoute } from '@tanstack/react-router' import Expensive from './-components/Expensive' export const Route = createLazyFileRoute('/expensive/')({ - component: Expensive + component: Expensive, }) diff --git a/nx.json b/nx.json index 6ac94fb43e..14e98b3fce 100644 --- a/nx.json +++ b/nx.json @@ -53,6 +53,10 @@ "inputs": ["default", "^public"], "outputs": ["{projectRoot}/build", "{projectRoot}/dist"], "cache": true + }, + "test:format": { + "cache": true, + "inputs": ["{workspaceRoot}/**/*"] } } }