1 ---
2 title: npm-install-ci-test
3 section: 1
4 description: Install a project with a clean slate and run tests
5 github_repo: npm/cli
6 github_branch: release/v10
7 github_path: docs/lib/content/commands/npm-install-ci-test.md
8 redirect_from:
9 - /cli-documentation/v10/cli-commands/install-ci-test
10 - /cli-documentation/v10/cli-commands/npm-install-ci-test
11 - /cli-documentation/v10/commands/install-ci-test
12 - /cli-documentation/v10/commands/npm-install-ci-test
13 - /cli-documentation/v10/install-ci-test
14 - /cli-documentation/v10/npm-install-ci-test
15 - /cli/v10/cli-commands/install-ci-test
16 - /cli/v10/cli-commands/npm-install-ci-test
17 - /cli/v10/commands/install-ci-test
18 - /cli/v10/install-ci-test
19 - /cli/v10/npm-install-ci-test
20 ---
21
22 ### Synopsis
23
24 ```bash
25 npm install-ci-test
26
27 aliases: cit, clean-install-test, sit
28 ```
29
30 ### Description
31
32 This command runs `npm ci` followed immediately by `npm test`.
33
34 ### Configuration
35
36 #### `install-strategy`
37
38 - Default: "hoisted"
39 - Type: "hoisted", "nested", "shallow", or "linked"
40
41 Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted.
42
43 #### `legacy-bundling`
44
45 - Default: false
46 - Type: Boolean
47 - DEPRECATED: This option has been deprecated in favor of `--install-strategy=nested`
48
49 Instead of hoisting package installs in `node_modules`, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets `--install-strategy=nested`.
50
51 #### `global-style`
52
53 - Default: false
54 - Type: Boolean
55 - DEPRECATED: This option has been deprecated in favor of `--install-strategy=shallow`
56
57 Only install direct dependencies in the top level `node_modules`, but hoist on deeper dependencies. Sets `--install-strategy=shallow`.
58
59 #### `omit`
60
61 - Default: 'dev' if the `NODE_ENV` environment variable is set to 'production', otherwise empty.
62 - Type: "dev", "optional", or "peer" (can be set multiple times)
63
64 Dependency types to omit from the installation tree on disk.
65
66 Note that these dependencies _are_ still resolved and added to the `package-lock.json` or `npm-shrinkwrap.json` file. They are just not physically installed on disk.
67
68 If a package type appears in both the `--include` and `--omit` lists, then it will be included.
69
70 If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
71
72 #### `include`
73
74 - Default:
75 - Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
76
77 Option that allows for defining which types of dependencies to install.
78
79 This is the inverse of `--omit=<type>`.
80
81 Dependency types specified in `--include` will not be omitted, regardless of the order in which omit/include are specified on the command-line.
82
83 #### `strict-peer-deps`
84
85 - Default: false
86 - Type: Boolean
87
88 If set to `true`, and `--legacy-peer-deps` is not set, then _any_ conflicting `peerDependencies` will be treated as an install failure, even if npm could reasonably guess the appropriate resolution based on non-peer dependency relationships.
89
90 By default, conflicting `peerDependencies` deep in the dependency graph will be resolved using the nearest non-peer dependency specification, even if doing so will result in some packages receiving a peer dependency outside the range set in their package's `peerDependencies` object.
91
92 When such an override is performed, a warning is printed, explaining the conflict and the packages involved. If `--strict-peer-deps` is set, then this warning is treated as a failure.
93
94 #### `foreground-scripts`
95
96 - Default: `false` unless when using `npm pack` or `npm publish` where it defaults to `true`
97 - Type: Boolean
98
99 Run all build scripts (ie, `preinstall`, `install`, and `postinstall`) scripts for installed packages in the foreground process, sharing standard input, output, and error with the main npm process.
100
101 Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging.
102
103 #### `ignore-scripts`
104
105 - Default: false
106 - Type: Boolean
107
108 If true, npm does not run scripts specified in package.json files.
109
110 Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
111
112 #### `audit`
113
114 - Default: true
115 - Type: Boolean
116
117 When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for [`npm audit`](/cli/v10/commands/npm-audit) for details on what is submitted.
118
119 #### `bin-links`
120
121 - Default: true
122 - Type: Boolean
123
124 Tells npm to create symlinks (or `.cmd` shims on Windows) for package executables.
125
126 Set to false to have it not do this. This can be used to work around the fact that some file systems don't support symlinks, even on ostensibly Unix systems.
127
128 #### `fund`
129
130 - Default: true
131 - Type: Boolean
132
133 When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v10/commands/npm-fund) for details.
134
135 #### `dry-run`
136
137 - Default: false
138 - Type: Boolean
139
140 Indicates that you don't want npm to make any changes and that it should only report what it would have done. This can be passed into any of the commands that modify your local installation, eg, `install`, `update`, `dedupe`, `uninstall`, as well as `pack` and `publish`.
141
142 Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
143
144 #### `workspace`
145
146 - Default:
147 - Type: String (can be set multiple times)
148
149 Enable running a command in the context of the configured workspaces of the current project while filtering by running only the workspaces defined by this configuration option.
150
151 Valid values for the `workspace` config are either:
152
153 - Workspace names
154 - Path to a workspace directory
155 - Path to a parent workspace directory (will result in selecting all workspaces within that folder)
156
157 When set for the `npm init` command, this may be set to the folder of a workspace which does not yet exist, to create the folder and set it up as a brand new workspace within the project.
158
159 This value is not exported to the environment for child processes.
160
161 #### `workspaces`
162
163 - Default: null
164 - Type: null or Boolean
165
166 Set to true to run the command in the context of **all** configured workspaces.
167
168 Explicitly setting this to false will cause commands like `install` to ignore workspaces altogether. When not set explicitly:
169
170 - Commands that operate on the `node_modules` tree (install, update, etc.) will link workspaces into the `node_modules` folder. - Commands that do other things (test, exec, publish, etc.) will operate on the root project, _unless_ one or more workspaces are specified in the `workspace` config.
171
172 This value is not exported to the environment for child processes.
173
174 #### `include-workspace-root`
175
176 - Default: false
177 - Type: Boolean
178
179 Include the workspace root when workspaces are enabled for a command.
180
181 When false, specifying individual workspaces via the `workspace` config, or all workspaces via the `workspaces` flag, will cause npm to operate only on the specified workspaces, and not on the root project.
182
183 This value is not exported to the environment for child processes.
184
185 #### `install-links`
186
187 - Default: false
188 - Type: Boolean
189
190 When set file: protocol dependencies will be packed and installed as regular dependencies instead of creating a symlink. This option has no effect on workspaces.
191
192 ### See Also
193
194 - [npm install-test](/cli/v10/commands/npm-install-test)
195 - [npm ci](/cli/v10/commands/npm-ci)
196 - [npm test](/cli/v10/commands/npm-test)