Skip to content
Novus Examples
yml560 B

CircleCI Config, Intentionally Invalid

An intentionally invalid CircleCI config: an unquoted `version: 2.10` that YAML loads as the float 2.1, a workflow referencing an undefined job, and a job with no execution environment. For testing that a validator rejects it and explains each fault.

Preview — first 21 linesyml
# INTENTIONALLY INVALID. Three documented faults:
#   1. `version: 2.10` is an unquoted YAML float, so it loads as 2.1 and not the string "2.10" —
#      the same class of bug as writing `version: 1.10` and getting 1.1
#   2. the `workflows` block references a job name that does not exist
#   3. the `build` job declares neither an executor nor a docker/machine/macos block
version: 2.10

jobs:
  build:
    steps:
      - checkout
      - run: make build

workflows:
  main:
    jobs:
      - build
      - publish:
          requires:
            - build

Specifications

System
CircleCI
Variant
intentionally invalid
Yaml Well Formed
true
Config Violations
3
Version Loads As
2.1

Testing contract

Expected to fail
Scenario
Validate a CircleCI config whose version key is an unquoted YAML float
Expected result
The version loads as 2.1 rather than the string "2.10", and validation additionally reports the undefined job and the missing executor

What is a .yml file?

YML is an alternate file extension for YAML, a human-readable data-serialization format based on indentation, key-value mappings, and lists. The content and parsing rules are identical to .yaml; only the extension differs. It is widely used for CI and application configuration files.

How to use this file

Use an example YML file to test that config loaders treat .yml and .yaml identically, and to exercise indentation, comment, and multi-document parsing.

How to use this file for testing

“CircleCI Config, Intentionally Invalid” is a deterministic Novus Examples fixture for Error handling, Config parsing, Schema validation. Deliberately corrupt and invalid files, clearly labelled, for testing how your tool fails.

Documented properties for this file: YML · 560 bytes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Pipeline and infrastructure fixtures are inert configuration: steps reference fictional images and scripts, and nothing here executes. Run your linter, schema validator, migrator, or policy engine against them, and expect the deprecated-syntax and intentionally invalid variants to be rejected.

Code examples

import yaml  # pip install pyyaml

with open("circleci-invalid.yml") as f:
    data = yaml.safe_load(f)
print(data)

Generated by generation/pipelines.py. Free for any use, no attribution required — license.