Skip to content

Commit 7913d64

Browse files
authored
chore(ci): check generated controlplane migrations (#257)
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
1 parent be30ebf commit 7913d64

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ jobs:
3838
go mod tidy
3939
git diff --exit-code -- go.mod go.sum
4040
41+
# Generate any possible migration from a schema change that way
42+
# we can detect any migration file that has not been checked in to git
43+
# This could happen if the developer ran make generate but didn't run make migration_new
44+
- name: Generate migrations
45+
if: ${{ matrix.app == 'controlplane' }}
46+
run: |
47+
wget -q https://release.ariga.io/atlas/atlas-linux-amd64-latest -O /tmp/atlas
48+
sudo install /tmp/atlas /usr/local/bin/atlas
49+
50+
make -C app/controlplane migration_new
51+
4152
# Check that the generated ent code is up to date
4253
# see https://entgo.io/docs/ci/
4354
- uses: ent/contrib/ci@master

0 commit comments

Comments
 (0)