Skip to content

Commit

Permalink
Try adding to a CI build.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Jan 5, 2024
1 parent c6b442f commit 05ee104
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install Poetry
uses: ./.github/actions/poetry

- name: Poetry install
run: poetry install
env:
POETRY_VIRTUALENVS_CREATE: false

- name: Test migrations
run: ./docker/ci/test_migrations.sh

Expand Down
17 changes: 16 additions & 1 deletion docker/ci/test_migrations.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
#!/bin/bash -x
#!/bin/bash

# This script makes sure that our database migrations bring the database up to date
# so that the resulting database is the same as if we had initialized a new instance.
#
# This is done by checking out the an older version of our codebase. The commit when
# the first migration was added and initializing a new instance. Then we check out
# the current version of our codebase and run the migrations. If the database is in
# sync, then the migrations are up to date. If the database is out of sync, then
# a new migration is required.
#
# This test is cannot be added to the normal migration test suite since it requires
# manipulating the git history and checking out older versions of the codebase.
#
# All of the commands in this script are run inside a docker-compose environment.


compose_cmd() {
docker --log-level ERROR compose --progress quiet "$@"
Expand Down

0 comments on commit 05ee104

Please sign in to comment.