Who built this? Meet the guy crazy enough to build this

CI/CD

Delivery Hub follows Salesforce's recommended development model: source-driven development with scratch orgs, automated testing, and continuous integration via CumulusCI and GitHub Actions.

Development Workflow

Every pull request gets its own scratch org. Tests run automatically. If they pass, the PR is ready for code review.

1. Branch

Developer creates a feature branch from main.

2. Scratch Org

GitHub Actions spins up a fresh scratch org and deploys the branch.

3. Test

All 74+ Apex test classes run automatically. Code coverage is reported.

4. Review

PR is reviewed by the team. The scratch org is available for manual QA.

5. Merge

After approval, the branch merges to main. The scratch org is deleted.

6. Deploy

Main branch is deployed to the packaging org and a new version is created.

CumulusCI Setup

Delivery Hub uses CumulusCI (CCI) for build automation. CCI provides tasks for creating scratch orgs, deploying metadata, loading data, and running tests.

Key CCI Tasks

TaskDescription
cci flow run dev_orgCreates a scratch org, deploys source, loads sample data.
cci flow run ci_featureCI flow: create scratch org, deploy, run all tests, report coverage.
cci flow run ci_masterMain branch flow: deploy to packaging org, create beta version.
cci task run run_testsRun all Apex tests in the connected org.
cci task run dx_pushPush source to the default scratch org.

GitHub Actions

The repository includes GitHub Actions workflows that automate the entire CI pipeline. Workflows are stored in .github/workflows/.

Workflow: Feature Branch

name: Feature Branch CI on: pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - run: pip install cumulusci - run: cci flow run ci_feature --org dev - run: cci task run run_tests --org dev

Workflow: Main Branch

name: Main Branch Deploy on: push: branches: [main] jobs: package: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: "3.11" - run: pip install cumulusci - run: cci flow run ci_master --org packaging

Scratch Org Per PR

Each pull request automatically gets a dedicated scratch org. This ensures:

  • Tests run in a clean environment every time
  • Reviewers can log into the scratch org for manual QA
  • No conflicts between concurrent feature branches
  • Scratch orgs are automatically deleted when the PR is merged or closed

Apex Tests

Delivery Hub includes 74+ Apex test classes covering:

  • Unit tests — individual methods and utility classes
  • Trigger tests — all object triggers with bulk data scenarios
  • Integration tests — sync engine, REST endpoints, callout mocks
  • LWC tests — Jest tests for all Lightning Web Components

Code coverage consistently exceeds 90% across the entire codebase. Tests are run automatically on every PR via GitHub Actions.

Related