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/v9
7 github_path: docs/lib/content/commands/npm-install-ci-test.md
8 redirect_from:
9 - /cli-documentation/v9/cli-commands/install-ci-test
10 - /cli-documentation/v9/cli-commands/npm-install-ci-test
11 - /cli-documentation/v9/commands/install-ci-test
12 - /cli-documentation/v9/commands/npm-install-ci-test
13 - /cli-documentation/v9/install-ci-test
14 - /cli-documentation/v9/npm-install-ci-test
15 - /cli/v9/cli-commands/install-ci-test
16 - /cli/v9/cli-commands/npm-install-ci-test
17 - /cli/v9/commands/install-ci-test
18 - /cli/v9/install-ci-test
19 - /cli/v9/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 #### `strict-peer-deps`
73
74 - Default: false
75 - Type: Boolean
76
77 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.
78
79 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.
80
81 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.
82
83 #### `foreground-scripts`
84
85 - Default: false
86 - Type: Boolean
87
88 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.
89
90 Note that this will generally make installs run slower, and be much noisier, but can be useful for debugging.
91
92 #### `ignore-scripts`
93
94 - Default: false
95 - Type: Boolean
96
97 If true, npm does not run scripts specified in package.json files.
98
99 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.
100
101 #### `audit`
102
103 - Default: true
104 - Type: Boolean
105
106 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/v9/commands/npm-audit) for details on what is submitted.
107
108 #### `bin-links`
109
110 - Default: true
111 - Type: Boolean
112
113 Tells npm to create symlinks (or `.cmd` shims on Windows) for package executables.
114
115 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.
116
117 #### `fund`
118
119 - Default: true
120 - Type: Boolean
121
122 When "true" displays the message at the end of each `npm install` acknowledging the number of dependencies looking for funding. See [`npm fund`](/cli/v9/commands/npm-fund) for details.
123
124 #### `dry-run`
125
126 - Default: false
127 - Type: Boolean
128
129 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`.
130
131 Note: This is NOT honored by other network related commands, eg `dist-tags`, `owner`, etc.
132
133 #### `workspace`
134
135 - Default:
136 - Type: String (can be set multiple times)
137
138 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.
139
140 Valid values for the `workspace` config are either:
141
142 - Workspace names
143 - Path to a workspace directory
144 - Path to a parent workspace directory (will result in selecting all workspaces within that folder)
145
146 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.
147
148 This value is not exported to the environment for child processes.
149
150 #### `workspaces`
151
152 - Default: null
153 - Type: null or Boolean
154
155 Set to true to run the command in the context of **all** configured workspaces.
156
157 Explicitly setting this to false will cause commands like `install` to ignore workspaces altogether. When not set explicitly:
158
159 - 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.
160
161 This value is not exported to the environment for child processes.
162
163 #### `include-workspace-root`
164
165 - Default: false
166 - Type: Boolean
167
168 Include the workspace root when workspaces are enabled for a command.
169
170 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.
171
172 This value is not exported to the environment for child processes.
173
174 #### `install-links`
175
176 - Default: false
177 - Type: Boolean
178
179 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.
180
181 ### See Also
182
183 - [npm install-test](/cli/v9/commands/npm-install-test)
184 - [npm ci](/cli/v9/commands/npm-ci)
185 - [npm test](/cli/v9/commands/npm-test)