Skip to content

Commit

Permalink
Check DB schema consistency post-migration in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
shuymn committed Aug 4, 2023
1 parent e1dfe30 commit 46db077
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/PRs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,29 @@ jobs:
- name: Check frontend types
run: npm --prefix frontend run types-check

- name: Checkout shuymn/sqldef
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
repository: shuymn/sqldef
ref: refs/heads/support-sqlite3-trigger
path: sqldef

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Build sqldef
working-directory: sqldef
run: |
make deps
make build
- name: Check DB schema
run: |
npm run database:migrate -- --local
./sqldef/build/linux-amd64/sqlite3def --enable-drop-table --config sqldef.yml --dry-run .wrangler/state/d1/DATABASE.sqlite3 < schema.sql | head -n 1 | grep -E '^-- Nothing is modified --$'
test-ui:
timeout-minutes: 10
runs-on: ubuntu-latest
Expand Down

0 comments on commit 46db077

Please sign in to comment.