---
title: "Adopting Neon branching in CI/CD pipelines: a practical story by Shepherd"
description: "Shepherd, an insurtech startup that moved its Alchemist pricing engine from SQLite to Postgres, uses Neon's copy-on-write database branches to give every pull request an ephemeral test database."
url: "https://swe.quest/articles/adopting-neon-branching-in-ci-cd-pipelines-a-practical-story-by-shepherd-7c4ee09d2fb5431a"
canonical: "https://neon.com/blog/adopting-neon-branching-in-ci-cd-pipelines-a-practical-story-by-shepherd"
source: "Neon"
published: "2024-07-11"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["ci-cd","postgres","schema-migrations","testing","serverless"]
---

# Adopting Neon branching in CI/CD pipelines: a practical story by Shepherd

A post on [Neon](https://swe.quest/sources/neon.md), published 2024-07-11, 5 min read, Case study. Original: [https://neon.com/blog/adopting-neon-branching-in-ci-cd-pipelines-a-practical-story-by-shepherd](https://neon.com/blog/adopting-neon-branching-in-ci-cd-pipelines-a-practical-story-by-shepherd)

## Summary

Shepherd, an insurtech startup that moved its Alchemist pricing engine from SQLite to Postgres, uses Neon's copy-on-write database branches to give every pull request an ephemeral test database. GitHub Actions call the Neon API to create a branch when a PR opens and delete it on merge. Changes then flow from per-developer and per-PR branches to staging and production, with Render pre-deploy commands applying migrations tracked in a dedicated timestamped table. The team credits branching with removing the cost and effort of keeping test instances synced with production, and notes that scale-to-zero means it no longer pays for idle databases.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Schema migrations](https://swe.quest/tags/schema-migrations.md) (Data & databases)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)

## Prerequisites

- GitHub Actions ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))
- Postgres basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- database migrations ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))

## Keywords

Neon, GitHub Actions, Render, PostgreSQL, SQLite, Shepherd

## Related posts

- [Branching Postgres databases with the Neon API](https://swe.quest/articles/branching-postgres-databases-with-the-neon-api-3faf0de941bc811a.md): Neon · 2022-12-07 · Medium · 3 min read · PostgreSQL, CI/CD, Testing
  Neon branches are copy-on-write clones of a Postgres database that can be created and deleted through the Neon API, giving CI pipelines an isolated copy of production data for end-to-end tests.
- [A database for every preview environment using Neon, GitHub Actions, and Vercel](https://swe.quest/articles/a-database-for-every-preview-environment-using-neon-github-actions-and-vercel-dd5fe24cba2d12b5.md): Neon · 2023-04-14 · Medium · 14 min read · PostgreSQL, CI/CD, Deployment, Schema migrations
  Neon's copy-on-write branching can give every pull request its own production-like Postgres database, avoiding the bottlenecks of shared staging or shared preview databases.
- [Behind Modem.dev’s Product Velocity](https://swe.quest/articles/behind-modem-dev-s-product-velocity-485adbdf853a0161.md): Neon · 2026-01-29 · Medium · 4 min read · PostgreSQL, Schema migrations, CI/CD, Developer productivity
  Modem, a startup building an AI agent that centralizes user feedback from Slack, Discord and GitHub, uses Neon Postgres branching as its development workflow.
- [From days to minutes: how Neo.Tax accelerated their development lifecycle](https://swe.quest/articles/from-days-to-minutes-how-neo-tax-accelerated-their-development-lifecycle-892985dc4d105ce2.md): Neon · 2024-06-03 · Medium · 5 min read · PostgreSQL, Testing, CI/CD, Developer productivity, Multi-tenancy
  Neo.Tax replaced a multi-day manual QA loop (product-created test customers, hand-verified PDFs, engineers hand-copying values into E2E fixtures via SQL dumps) with per-PR Neon database branches created by the Neon CLI, named after the GitHub branch, injected into Cloud Run via CircleCI environment variables, and deleted on merge.
- [Practical Guide to Database Branching](https://swe.quest/articles/practical-guide-to-database-branching-8aa2f63325bcfecb.md): Neon · 2025-12-04 · Medium · 9 min read · PostgreSQL, Databases, CI/CD, Schema migrations, Testing
  Neon's copy-on-write storage makes Postgres database branches instant and cheap: each branch shares the parent's base data, gets its own autoscaling compute that scales to zero, and can be created from any point within the history retention window.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
