# ci

> Run tests for CI/CD pipelines.

# `datacontract ci`

{/* AUTOGENERATED from `datacontract --help`: do not edit by hand; regenerate with update_command_docs.py */}

Run tests for CI/CD pipelines. Emits GitHub Actions annotations and step summary.

```bash
datacontract ci [OPTIONS] [LOCATIONS]...
```

| Argument | Default | Description |
|---|---|---|
| `[LOCATIONS]...` | — | The location(s) (url, s3 url, or local path) of the data contract yaml file(s). |

| Option | Default | Description |
|---|---|---|
| `--json-schema` | — | The location (url or path) of the ODCS JSON Schema |
| `--server` | `all` | The server configuration to run the schema and quality tests. Use the key of the server object in the data contract yaml file to refer to a server, e.g., `production`, or `all` for all servers (default). |
| `--publish` | — | The url to publish the results after the test. |
| `--output` | — | Specify the file path where the test results should be written to (e.g., './test-results/TEST-datacontract.xml'). |
| `--output-format` | — | The target format for the test results. Accepted values: json, junit. |
| `--logs` / `--no-logs` | `--no-logs` | Print logs |
| `--json` | off | Print test results as JSON to stdout. |
| `--fail-on` | `error` | Minimum severity that causes a non-zero exit code. |
| `--ssl-verification` / `--no-ssl-verification` | `--ssl-verification` | SSL verification when publishing the data contract. |
| `--inline-references` / `--no-inline-references` | `--inline-references` | Resolve external references (currently: authoritativeDefinitions\[type in \{definition, semantics\}]) in the contract and inline the fetched content from the configured entropy-data host. |
| `--debug` / `--no-debug` | — | Enable debug logging |

```bash
datacontract ci datacontract.yaml --output test-results.xml --output-format junit
```

Guide: **[Scheduling and CI/CD](../ci-cd.md)**.
