hemp-db

Build Pipeline

This page contains information on the build pipeline for HempDB and is intended for developers.

GitHub Actions

CI Workflow

The Django CI workflow is configured by the migrate-test-lint.yml file. This workflow runs on PRs opened to main.

Its purpose is to run migrations on the CI database, tests, and the lint check. This workflow must pass before a PR is merged to main. Tests are found in helloworld/tests.py.

Deploy Workflow

The Django Deploy to Prod workflow is configured by the deploy.yml file. This workflow runs on pushes (PR merges) to main.

Its purpose is to run migrations on the production database as changes are merged into main and deployed to the production Vercel deployment.

Pages Workflow

The pages-build-deployment workflow deploys the markdown files in docs/ to this documentation site.

Vercel

Vercel runs build.sh for the build step. For this to pass, just make sure all dependencies are listed in requirements.txt and all versions are correct.

Once the Vercel build passes on a PR, Vercel will create a deployment for the PR. This is a site with your changes. The deployment can be visited by clicking the link highlighted below from the PR.

EER Diagram

Note that these PR deployments are considered Preview deployments and not a Production deployment. As a result, they will use the DATABASE_URL environment variable that is associated with the Preview environment (the development database) on Vercel, not Production.