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: latest
7 github_path: docs/lib/content/commands/npm-install-ci-test.md
8 redirect_from:
9 - /cli-commands/install-ci-test
10 - /cli-commands/npm-install-ci-test
11 - /cli-documentation/cli-commands/install-ci-test
12 - /cli-documentation/cli-commands/npm-install-ci-test
13 - /cli-documentation/commands/install-ci-test
14 - /cli-documentation/commands/npm-install-ci-test
15 - /cli-documentation/install-ci-test
16 - /cli-documentation/npm-install-ci-test
17 - /cli-documentation/v11/cli-commands/install-ci-test
18 - /cli-documentation/v11/cli-commands/npm-install-ci-test
19 - /cli-documentation/v11/commands/install-ci-test
20 - /cli-documentation/v11/commands/npm-install-ci-test
21 - /cli-documentation/v11/install-ci-test
22 - /cli-documentation/v11/npm-install-ci-test
23 - /cli/cli-commands/install-ci-test
24 - /cli/cli-commands/npm-install-ci-test
25 - /cli/commands/install-ci-test
26 - /cli/commands/npm-install-ci-test
27 - /cli/install-ci-test
28 - /cli/npm-install-ci-test
29 - /cli/v11/cli-commands/install-ci-test
30 - /cli/v11/cli-commands/npm-install-ci-test
31 - /cli/v11/commands/install-ci-test
32 - /cli/v11/install-ci-test
33 - /cli/v11/npm-install-ci-test
34 - /commands/install-ci-test
35 - /commands/npm-install-ci-test
36 ---
37
38 ### Synopsis
39
40 ```bash
41 npm install-ci-test
42
43 aliases: cit, clean-install-test, sit
44 ```
45
46 ### Description
47
48 This command runs `npm ci` followed immediately by `npm test`.
49
50 ### Configuration
51
52 #### `install-strategy`
53
54 - Default: "hoisted"
55 - Type: "hoisted", "nested", "shallow", or "linked"
56
57 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.
58
59 #### `legacy-bundling`
60
61 - Default: false
62 - Type: Boolean
63 - DEPRECATED: This option has been deprecated in favor of `--install-strategy=nested`
64
65 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`.
66
67 #### `global-style`
68
69 - Default: false
70 - Type: Boolean
71 - DEPRECATED: This option has been deprecated in favor of `--install-strategy=shallow`
72
73 Only install direct dependencies in the top level `node_modules`, but hoist on deeper dependencies. Sets `--install-strategy=shallow`.
74
75 #### `omit`
76
77 - Default: 'dev' if the `NODE_ENV` environment variable is set to 'production'; otherwise, empty.
78 - Type: "dev", "optional", or "peer" (can be set multiple times)
79
80 Dependency types to omit from the installation tree on disk.
81
82 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.
83
84 If a package type appears in both the `--include` and `--omit` lists, then it will be included.
85
86 If the resulting omit list includes `'dev'`, then the `NODE_ENV` environment variable will be set to `'production'` for all lifecycle scripts.
87
88 #### `include`
89
90 - Default:
91 - Type: "prod", "dev", "optional", or "peer" (can be set multiple times)
92
93 Option that allows for defining which types of dependencies to install.
94
95 This is the inverse of `--omit=<type>`.
96
97 Dependency types specified in `--include` will not be omitted, regardless of the order in which omit/include are specified on the command-line.
98
99 #### `strict-peer-deps`
100
101 - Default: false
102 - Type: Boolean
103
104 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.
105
106 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.
107
108 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.
109
110 #### `foreground-scripts`
111
112 - Default: `false` unless when using `npm pack` or `npm publish` where it defaults to `true`
113 - Type: Boolean
114
115 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.
116
117 Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging.
118
119 #### `ignore-scripts`
120
121 - Default: false
122 - Type: Boolean
123
124 If true, npm does not run scripts specified in package.json files.
125
126 Note that commands explicitly intended to run a particular script, such as `npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
127
128 #### `allow-directory`
129
130 - Default: "all"
131 - Type: "all", "none", or "root"
132
133 Limits the ability for npm to install dependencies from directories. That is, dependencies that point to a directory instead of a version or semver range. Please note that this could leave your tree incomplete and some packages may not function as intended or designed. Changing this setting will not remove dependencies that are already installed.
134
135 `all` allows any directories to be installed. `none` prevents any directories from being installed. `root` only allows directories defined in your project's package.json to be installed. Also allows directory dependencies to be used for other commands like `npm view`
136
137 #### `allow-file`
138
139 - Default: "all"
140 - Type: "all", "none", or "root"
141
142 Limits the ability for npm to install dependencies from tarball files. That is, dependencies that point to a local tarball file instead of a version or semver range. Please note that this could leave your tree incomplete and some packages may not function as intended or designed. Changing this setting will not remove dependencies that are already installed.
143
144 `all` allows any tarball file to be installed. `none` prevents any tarball file from being installed. `root` only allows tarball files defined in your project's package.json to be installed. Also allows tarball file dependencies to be used for other commands like `npm view`
145
146 #### `allow-git`
147
148 - Default: "all"
149 - Type: "all", "none", or "root"
150
151 Limits the ability for npm to fetch dependencies from git references. That is, dependencies that point to a git repo instead of a version or semver range. Please note that this could leave your tree incomplete and some packages may not function as intended or designed. Changing this setting will not remove dependencies that are already installed.
152
153 `all` allows any git dependencies to be fetched and installed. `none` prevents any git dependencies from being fetched and installed. `root` only allows git dependencies defined in your project's package.json to be fetched and installed. Also allows git dependencies to be fetched for other commands like `npm view`
154
155 #### `allow-remote`
156
157 - Default: "all"
158 - Type: "all", "none", or "root"
159
160 Limits the ability for npm to fetch dependencies from urls. That is, dependencies that point to a tarball url instead of a version or semver range. Please note that this could leave your tree incomplete and some packages may not function as intended or designed. Changing this setting will not remove dependencies that are already installed.
161
162 `all` allows any url to be installed. `none` prevents any url from being installed. `root` only allows urls defined in your project's package.json to be installed. Also allows url dependencies to be used for other commands like `npm view`
163
164 #### `audit`
165
166 - Default: true
167 - Type: Boolean
168
169 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/v11/commands/npm-audit) for details on what is submitted.
170
171 #### `bin-links`
172
173 - Default: true
174 - Type: Boolean
175
176 Tells npm to create symlinks (or `.cmd` shims on Windows) for package executables.
177
178 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.
179
180 #### `fund`
181
182 - Default: true
183 - Type: Boolean
184
185 When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v11/commands/npm-fund) for details.
186
187 #### `dry-run`
188
189 - Default: false
190 - Type: Boolean
191
192 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`.
193
194 Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
195
196 #### `workspace`
197
198 - Default:
199 - Type: String (can be set multiple times)
200
201 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.
202
203 Valid values for the `workspace` config are either:
204
205 - Workspace names
206 - Path to a workspace directory
207 - Path to a parent workspace directory (will result in selecting all workspaces within that folder)
208
209 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.
210
211 This value is not exported to the environment for child processes.
212
213 #### `workspaces`
214
215 - Default: null
216 - Type: null or Boolean
217
218 Set to true to run the command in the context of **all** configured workspaces.
219
220 Explicitly setting this to false will cause commands like `install` to ignore workspaces altogether. When not set explicitly:
221
222 - 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.
223
224 This value is not exported to the environment for child processes.
225
226 #### `include-workspace-root`
227
228 - Default: false
229 - Type: Boolean
230
231 Include the workspace root when workspaces are enabled for a command.
232
233 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.
234
235 This value is not exported to the environment for child processes.
236
237 #### `install-links`
238
239 - Default: false
240 - Type: Boolean
241
242 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.
243
244 ### See Also
245
246 - [npm install-test](/cli/v11/commands/npm-install-test)
247 - [npm ci](/cli/v11/commands/npm-ci)
248 - [npm test](/cli/v11/commands/npm-test)