From e0306d10cf27152ed4cb7a06dbf45c6da2e93ef6 Mon Sep 17 00:00:00 2001 From: Lukramancer <57191063+Lukramancer@users.noreply.github.com> Date: Mon, 10 Aug 2026 22:20:32 +0300 Subject: [PATCH 1/6] ci-cd: add migrations eqwall testing, rename app tests workflow file --- .../workflows/{test.yaml => app-testing.yaml} | 0 .github/workflows/migrations-testing.yaml | 39 +++++++++++++++++++ 2 files changed, 39 insertions(+) rename .github/workflows/{test.yaml => app-testing.yaml} (100%) create mode 100644 .github/workflows/migrations-testing.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/app-testing.yaml similarity index 100% rename from .github/workflows/test.yaml rename to .github/workflows/app-testing.yaml diff --git a/.github/workflows/migrations-testing.yaml b/.github/workflows/migrations-testing.yaml new file mode 100644 index 0000000..dc78194 --- /dev/null +++ b/.github/workflows/migrations-testing.yaml @@ -0,0 +1,39 @@ +name: Run migrations seqwall test + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:18-alpine + env: + POSTGRES_PASSWORD: password + POSTGRES_DB: migrations_test_db + ports: + - 5432:5432 + + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 'stable' + + - name: Install seqwall + run: go install github.com/realkarych/seqwall@latest + + - name: Run tests + env: + TEST_DB_URL: postgres://postgres:password@localhost:5432/migrations_test_db + run: | + seqwall staircase \ + --postgres-url "$TEST_DB_URL" \ + --migrations-path ./migrations \ + --migrations-extension ."up.sql" \ + --upgrade "bash scripts/ci-up-one.sh {current_migration} \"$TEST_DB_URL\"" \ + --downgrade "bash scripts/ci-down-one.sh {current_migration} \"$TEST_DB_URL\"" + From bef65f338eca34fcb5b2cd671704dd7206c2a6fa Mon Sep 17 00:00:00 2001 From: Lukramancer <57191063+Lukramancer@users.noreply.github.com> Date: Mon, 10 Aug 2026 22:23:14 +0300 Subject: [PATCH 2/6] ci-cd: fix TEST_DB_URL with disabled ssl mode --- .github/workflows/migrations-testing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/migrations-testing.yaml b/.github/workflows/migrations-testing.yaml index dc78194..7c2f876 100644 --- a/.github/workflows/migrations-testing.yaml +++ b/.github/workflows/migrations-testing.yaml @@ -28,7 +28,7 @@ jobs: - name: Run tests env: - TEST_DB_URL: postgres://postgres:password@localhost:5432/migrations_test_db + TEST_DB_URL: postgres://postgres:password@localhost:5432/migrations_test_db?sslmode=disable run: | seqwall staircase \ --postgres-url "$TEST_DB_URL" \ From 0625d32336d4a5dcb798e5d491a727cd1911be53 Mon Sep 17 00:00:00 2001 From: Lukramancer <57191063+Lukramancer@users.noreply.github.com> Date: Mon, 10 Aug 2026 22:31:31 +0300 Subject: [PATCH 3/6] ci-cd: added golang-migrate --- .github/workflows/migrations-testing.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/migrations-testing.yaml b/.github/workflows/migrations-testing.yaml index 7c2f876..c8706dd 100644 --- a/.github/workflows/migrations-testing.yaml +++ b/.github/workflows/migrations-testing.yaml @@ -25,6 +25,9 @@ jobs: - name: Install seqwall run: go install github.com/realkarych/seqwall@latest + + - name: Install golang-migrate + run: go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest - name: Run tests env: From ecd024ff717ec4f8a07604c3c56d7ed555a7bae1 Mon Sep 17 00:00:00 2001 From: Lukramancer <57191063+Lukramancer@users.noreply.github.com> Date: Tue, 11 Aug 2026 20:43:12 +0300 Subject: [PATCH 4/6] ci-cd: update checkout action from v4 to v7 --- .github/workflows/migrations-testing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/migrations-testing.yaml b/.github/workflows/migrations-testing.yaml index c8706dd..c49232a 100644 --- a/.github/workflows/migrations-testing.yaml +++ b/.github/workflows/migrations-testing.yaml @@ -16,7 +16,7 @@ jobs: - 5432:5432 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Set up Go uses: actions/setup-go@v5 From 111fe72eed232139351d6ad5707e076dad3a1c92 Mon Sep 17 00:00:00 2001 From: Lukramancer <57191063+Lukramancer@users.noreply.github.com> Date: Tue, 11 Aug 2026 20:46:08 +0300 Subject: [PATCH 5/6] ci-cd: update setup-go action from v5 to v7 --- .github/workflows/migrations-testing.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/migrations-testing.yaml b/.github/workflows/migrations-testing.yaml index c49232a..3755d00 100644 --- a/.github/workflows/migrations-testing.yaml +++ b/.github/workflows/migrations-testing.yaml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v7 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v7 with: go-version: 'stable' From a98f7c016cf81e43e3000e6f5487c8eca3b68422 Mon Sep 17 00:00:00 2001 From: Lukramancer <57191063+Lukramancer@users.noreply.github.com> Date: Tue, 11 Aug 2026 21:03:09 +0300 Subject: [PATCH 6/6] ci-cd: disable cache in setup-go action to supress a warning --- .github/workflows/migrations-testing.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/migrations-testing.yaml b/.github/workflows/migrations-testing.yaml index 3755d00..b1a24f0 100644 --- a/.github/workflows/migrations-testing.yaml +++ b/.github/workflows/migrations-testing.yaml @@ -22,6 +22,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: 'stable' + cache: false - name: Install seqwall run: go install github.com/realkarych/seqwall@latest