chore(repo): run lint,test, and build in the same command in CI (#19189)

This commit is contained in:
Jason Jean 2023-09-18 12:01:27 -04:00 committed by GitHub
parent 56481d6976
commit b2a9d4d79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 10 deletions

View File

@ -191,11 +191,7 @@ jobs:
pnpm nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte &
pids+=($!)
pnpm nx affected --target=lint --base=$NX_BASE --head=$NX_HEAD --parallel=3 &
pids+=($!)
pnpm nx affected --target=test --base=$NX_BASE --head=$NX_HEAD --parallel=1 &
pids+=($!)
(pnpm nx affected --target=build --base=$NX_BASE --head=$NX_HEAD --parallel=3 &&
(pnpm nx affected --targets=lint,test,build --base=$NX_BASE --head=$NX_HEAD --parallel=3 &&
pnpm nx affected --target=e2e --base=$NX_BASE --head=$NX_HEAD --parallel=1) &
pids+=($!)

View File

@ -32,8 +32,7 @@
}
},
"workspaceLayout": {
"appsDir": "",
"libsDir": ""
"projectNameAndRootFormat": "as-provided"
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],

View File

@ -5,7 +5,7 @@ import {
getRelativeImports,
getWithNxContent,
} from './create-next-config-file';
import { stripIndents } from '@nx/devkit';
import { stripIndents, workspaceLayout } from '@nx/devkit';
import { join } from 'path';
describe('Next.js config: getWithNxContent', () => {
@ -60,8 +60,8 @@ describe('Next.js config: getWithNxContent', () => {
expect(result).not.toContain(
`const { workspaceRoot, workspaceLayout } = require('@nx/devkit');`
);
expect(result).toContain(`libsDir: ''`);
expect(result).not.toContain(`libsDir: workspaceLayout.libsDir()`);
expect(result).toContain(`libsDir: '${workspaceLayout().libsDir}'`);
expect(result).not.toContain(`libsDir: workspaceLayout().libsDir`);
});
it('should return relative module paths used in next.config.js when calling getRelativeFilesToCopy', () => {