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-script` will still run their intended script if `ignore-scripts` is set, but they will _not_ run any pre- or post-scripts.
127
128 #### `audit`
129
130 - Default: true
131 - Type: Boolean
132
133 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.
134
135 #### `bin-links`
136
137 - Default: true
138 - Type: Boolean
139
140 Tells npm to create symlinks (or `.cmd` shims on Windows) for package executables.
141
142 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.
143
144 #### `fund`
145
146 - Default: true
147 - Type: Boolean
148
149 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.
150
151 #### `dry-run`
152
153 - Default: false
154 - Type: Boolean
155
156 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`.
157
158 Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
159
160 #### `workspace`
161
162 - Default:
163 - Type: String (can be set multiple times)
164
165 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.
166
167 Valid values for the `workspace` config are either:
168
169 - Workspace names
170 - Path to a workspace directory
171 - Path to a parent workspace directory (will result in selecting all workspaces within that folder)
172
173 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.
174
175 This value is not exported to the environment for child processes.
176
177 #### `workspaces`
178
179 - Default: null
180 - Type: null or Boolean
181
182 Set to true to run the command in the context of **all** configured workspaces.
183
184 Explicitly setting this to false will cause commands like `install` to ignore workspaces altogether. When not set explicitly:
185
186 - 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.
187
188 This value is not exported to the environment for child processes.
189
190 #### `include-workspace-root`
191
192 - Default: false
193 - Type: Boolean
194
195 Include the workspace root when workspaces are enabled for a command.
196
197 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.
198
199 This value is not exported to the environment for child processes.
200
201 #### `install-links`
202
203 - Default: false
204 - Type: Boolean
205
206 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.
207
208 ### See Also
209
210 - [npm install-test](/cli/v11/commands/npm-install-test)
211 - [npm ci](/cli/v11/commands/npm-ci)
212 - [npm test](/cli/v11/commands/npm-test)