Skip to content

Commit c83ad36

Browse files
committed
feat(ci): do not skip nx/turbo cache for print-config and compare commands
1 parent 35e334f commit c83ad36

File tree

6 files changed

+19
-37
lines changed

6 files changed

+19
-37
lines changed

packages/ci/src/lib/monorepo/handlers/nx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const nxHandler: MonorepoToolHandler = {
4141
const projects = parseProjects(stdout);
4242
return projects.toSorted().map(project => ({
4343
name: project,
44-
bin: `npx nx run ${project}:${task} --skip-nx-cache --`,
44+
bin: `npx nx run ${project}:${task} --`,
4545
}));
4646
},
4747

packages/ci/src/lib/monorepo/handlers/nx.unit.test.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,8 @@ describe('nxHandler', () => {
5656

5757
it('should list projects from `nx show projects`', async () => {
5858
await expect(nxHandler.listProjects(options)).resolves.toEqual([
59-
{
60-
name: 'backend',
61-
bin: 'npx nx run backend:code-pushup --skip-nx-cache --',
62-
},
63-
{
64-
name: 'frontend',
65-
bin: 'npx nx run frontend:code-pushup --skip-nx-cache --',
66-
},
59+
{ name: 'backend', bin: 'npx nx run backend:code-pushup --' },
60+
{ name: 'frontend', bin: 'npx nx run frontend:code-pushup --' },
6761
] satisfies ProjectConfig[]);
6862
});
6963

@@ -125,14 +119,8 @@ describe('nxHandler', () => {
125119
describe('createRunManyCommand', () => {
126120
const projects: MonorepoHandlerProjectsContext = {
127121
all: [
128-
{
129-
name: 'backend',
130-
bin: 'npx nx run backend:code-pushup --skip-nx-cache --',
131-
},
132-
{
133-
name: 'frontend',
134-
bin: 'npx nx run frontend:code-pushup --skip-nx-cache --',
135-
},
122+
{ name: 'backend', bin: 'npx nx run backend:code-pushup --' },
123+
{ name: 'frontend', bin: 'npx nx run frontend:code-pushup --' },
136124
],
137125
};
138126

packages/ci/src/lib/monorepo/handlers/turbo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const turboHandler: MonorepoToolHandler = {
3232
.map(({ name, directory }) => ({
3333
name,
3434
directory,
35-
bin: `npx turbo run ${options.task} --no-cache --force --`,
35+
bin: `npx turbo run ${options.task} --`,
3636
}));
3737
}
3838
}

packages/ci/src/lib/monorepo/handlers/turbo.unit.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ describe('turboHandler', () => {
137137
{
138138
name: '@example/cli',
139139
directory: path.join(MEMFS_VOLUME, 'packages', 'cli'),
140-
bin: 'npx turbo run code-pushup --no-cache --force --',
140+
bin: 'npx turbo run code-pushup --',
141141
},
142142
{
143143
name: '@example/core',
144144
directory: path.join(MEMFS_VOLUME, 'packages', 'core'),
145-
bin: 'npx turbo run code-pushup --no-cache --force --',
145+
bin: 'npx turbo run code-pushup --',
146146
},
147147
] satisfies ProjectConfig[]);
148148
},
@@ -171,19 +171,19 @@ describe('turboHandler', () => {
171171
name: 'api',
172172
directory: path.join(MEMFS_VOLUME, 'api'),
173173
bin: 'npx turbo run code-pushup --',
174-
binUncached: 'npx turbo run code-pushup --no-cache --force --',
174+
binUncached: 'npx turbo run code-pushup --',
175175
},
176176
{
177177
name: 'cms',
178178
directory: path.join(MEMFS_VOLUME, 'cms'),
179179
bin: 'npx turbo run code-pushup --',
180-
binUncached: 'npx turbo run code-pushup --no-cache --force --',
180+
binUncached: 'npx turbo run code-pushup --',
181181
},
182182
{
183183
name: 'web',
184184
directory: path.join(MEMFS_VOLUME, 'web'),
185185
bin: 'npx turbo run code-pushup --',
186-
binUncached: 'npx turbo run code-pushup --no-cache --force --',
186+
binUncached: 'npx turbo run code-pushup --',
187187
},
188188
],
189189
};

packages/ci/src/lib/monorepo/list-projects.unit.test.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,8 @@ describe('listMonorepoProjects', () => {
5858
await expect(listMonorepoProjects(MONOREPO_SETTINGS)).resolves.toEqual({
5959
tool: 'nx',
6060
projects: [
61-
{
62-
name: 'backend',
63-
bin: 'npx nx run backend:code-pushup --skip-nx-cache --',
64-
},
65-
{
66-
name: 'frontend',
67-
bin: 'npx nx run frontend:code-pushup --skip-nx-cache --',
68-
},
61+
{ name: 'backend', bin: 'npx nx run backend:code-pushup --' },
62+
{ name: 'frontend', bin: 'npx nx run frontend:code-pushup --' },
6963
],
7064
runManyCommand: expect.any(Function),
7165
} satisfies MonorepoProjects);
@@ -126,22 +120,22 @@ describe('listMonorepoProjects', () => {
126120
{
127121
name: 'api',
128122
directory: path.join(MEMFS_VOLUME, 'backend', 'api'),
129-
bin: 'npx turbo run code-pushup --no-cache --force --',
123+
bin: 'npx turbo run code-pushup --',
130124
},
131125
{
132126
name: 'auth',
133127
directory: path.join(MEMFS_VOLUME, 'backend', 'auth'),
134-
bin: 'npx turbo run code-pushup --no-cache --force --',
128+
bin: 'npx turbo run code-pushup --',
135129
},
136130
{
137131
name: 'cms',
138132
directory: path.join(MEMFS_VOLUME, 'frontend', 'cms'),
139-
bin: 'npx turbo run code-pushup --no-cache --force --',
133+
bin: 'npx turbo run code-pushup --',
140134
},
141135
{
142136
name: 'web',
143137
directory: path.join(MEMFS_VOLUME, 'frontend', 'web'),
144-
bin: 'npx turbo run code-pushup --no-cache --force --',
138+
bin: 'npx turbo run code-pushup --',
145139
},
146140
],
147141
runManyCommand: expect.any(Function),

packages/ci/src/lib/run.integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,15 +534,15 @@ describe('runInCI', () => {
534534
name: 'Nx',
535535
tool: 'nx',
536536
run: expect.stringMatching(
537-
/^npx nx run (cli|core|utils):code-pushup --skip-nx-cache --$/,
537+
/^npx nx run (cli|core|utils):code-pushup --$/,
538538
),
539539
runMany:
540540
'npx nx run-many --targets=code-pushup --parallel=false --projects=cli,core,utils --',
541541
},
542542
{
543543
name: 'Turborepo',
544544
tool: 'turbo',
545-
run: 'npx turbo run code-pushup --no-cache --force --',
545+
run: 'npx turbo run code-pushup --',
546546
runMany: 'npx turbo run code-pushup --concurrency=1 --',
547547
},
548548
{

0 commit comments

Comments
 (0)