The circle.yml
file is made up of six
primary sections. Each section represents a phase of running your tests:
-
machine:
-
adjusting the VM to your preferences and requirements
-
checkout:
-
checking out and cloning your git repo
-
dependencies:
-
setting up your project’s language-specific dependencies
-
database:
-
preparing the databases for your tests
-
test:
-
running your tests
-
deployment:
-
deploying your code to your web servers
a non-zero
exit code during the setup sections (machine:
, checkout:
, dependencies:
, database:
) will cause the build to fail early.
You can modify which—and when—commands are run by adding override
, pre
and/or post
to adjust CircleCI’s inferred commands. Here’s how it works:
pre:
commands run before CircleCI’s inferred commands
override:
commands run instead of CircleCI’s inferred commands
post:
commands run after CircleCI’s inferred commands