Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita04c76c

Browse files
authored
ci: release: test migrations before building (#13051)
1 parent215dd7b commita04c76c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ jobs:
130130
AC_CERTIFICATE_PASSWORD:${{ secrets.AC_CERTIFICATE_PASSWORD }}
131131
AC_APIKEY_P8_BASE64:${{ secrets.AC_APIKEY_P8_BASE64 }}
132132

133+
-name:Test migrations from current ref to main
134+
run:|
135+
make test-migrations
136+
133137
-name:Build binaries
134138
run:|
135139
set -euo pipefail

‎Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,11 @@ test-postgres: test-postgres-docker
785785

786786
test-migrations: test-postgres-docker
787787
echo"--- test migrations"
788+
set -euo pipefail
788789
COMMIT_FROM=$(shell git rev-parse --short HEAD)
789790
COMMIT_TO=$(shell git rev-parse --short main)
790-
DB_NAME=$(shell go run scripts/migrate-ci/main.go)
791-
go run ./scripts/migrate-test/main.go --from="$$COMMIT_FROM" --to="$$COMMIT_TO" --postgres-url="postgresql://postgres:postgres@localhost:5432/$$DB_NAME?sslmode=disable"
791+
echo"DROP DATABASE IF EXISTS migrate_test_$${COMMIT_FROM}; CREATE DATABASE migrate_test_$${COMMIT_FROM};"| psql'postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable'
792+
go run ./scripts/migrate-test/main.go --from="$$COMMIT_FROM" --to="$$COMMIT_TO" --postgres-url="postgresql://postgres:postgres@localhost:5432/migrate_test_$${COMMIT_FROM}?sslmode=disable"
792793

793794
# NOTE: we set --memory to the same size as a GitHub runner.
794795
test-postgres-docker:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp