Scratch orgs & CI
The final piece of professional development is DevOps: shipping changes reliably and repeatably instead of clicking in production. Two ideas anchor the modern Salesforce workflow — scratch orgs and continuous integration (CI) — and both build on the source-driven model from earlier in this track.
A scratch org is a disposable, source-defined Salesforce environment. Its shape is described by a project-scratch-def.json file, so anyone on the team can spin up an identical org from source in seconds, push the project's metadata into it, load sample data, run tests, and throw it away. This is the heart of source-driven development: the Git repository is the source of truth, and orgs are cheap, reproducible build targets rather than precious hand-configured snowflakes.
# Create a scratch org from the project definition
sf org create scratch --definition-file config/project-scratch-def.json \
--alias ci-run --duration-days 1 --set-default
# Push source, then run all local tests
sf project deploy start
sf apex run test --test-level RunLocalTests --wait 10 --result-format human
# Clean up
sf org delete scratch --target-org ci-run --no-prompt
Continuous integration automates exactly that sequence on every pull request. A CI service (GitHub Actions, GitLab CI, and others) runs a pipeline that authorises a Dev Hub, creates a fresh scratch org, deploys the branch's metadata, runs the full Apex test suite, and reports pass or fail back on the PR. Because every change is validated in a clean org before merge, regressions are caught early and "it worked in my org" disappears.
Beyond CI, teams use unlocked packages to modularise metadata and promote a versioned artifact from integration to staging to production, giving true release management. Authentication in automation uses a JWT flow so no human login is needed.
As an exercise, add a scratch-org definition to your project, script the create/deploy/test/delete cycle locally, then wire it into a simple GitHub Actions workflow that runs on every push. With source control, scratch orgs, tests, and CI, you can develop like a professional team — and you have completed the developer roadmap, ready for Platform Developer I and real project work.