Skip to content

Commit d810646

Browse files
authored
Merge pull request #67 from powersync-ja/fix-migrations
Fix migration tests
2 parents 251b1f1 + 4b779b8 commit d810646

File tree

9 files changed

+21
-0
lines changed

9 files changed

+21
-0
lines changed

.github/workflows/android.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
3+
pull_request:
34
name: "android"
45
jobs:
56
build:
67
name: Building Android
8+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
79
runs-on: ubuntu-latest
810
steps:
911
- uses: actions/checkout@v3

.github/workflows/ios.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
3+
pull_request:
34
name: "ios"
45
jobs:
56
build:
67
name: Building iOS
8+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
79
runs-on: macos-latest
810
steps:
911
- uses: actions/checkout@v3

.github/workflows/linux.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
3+
pull_request:
34
name: "linux"
45
jobs:
56
build_x86_64:
67
name: Building Linux x86_64
8+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
79
runs-on: ubuntu-latest
810
steps:
911
- uses: actions/checkout@v3
@@ -21,6 +23,7 @@ jobs:
2123

2224
build_aarch64:
2325
name: Building Linux aarch64
26+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
2427
runs-on: ubuntu-arm64
2528
steps:
2629
- uses: actions/checkout@v3

.github/workflows/macos.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
3+
pull_request:
34
name: "macos"
45
jobs:
56
build_macOS_aarch64:
67
name: Building macOS aarch64
8+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
79
runs-on: macos-latest
810
steps:
911
- uses: actions/checkout@v3
@@ -21,6 +23,7 @@ jobs:
2123

2224
build_macOS_x64:
2325
name: Building macOS x64
26+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
2427
runs-on: macos-14
2528
steps:
2629
- uses: actions/checkout@v3

.github/workflows/tests.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
3+
pull_request:
34
name: "tests"
45
jobs:
56
build:
67
name: Testing on ${{ matrix.os }}
8+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
79
runs-on: ${{ matrix.os }}
810
strategy:
911
fail-fast: false

.github/workflows/valgrind.yml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ jobs:
66
build:
77
name: Testing with Valgrind on ${{ matrix.os }}
88
runs-on: ${{ matrix.os }}
9+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
910
strategy:
1011
matrix:
1112
include:

.github/workflows/wasm.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
3+
pull_request:
34
name: "wasm"
45
jobs:
56
build_wasm:
67
name: Basic WASM build
8+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
79
runs-on: ubuntu-latest
810
steps:
911
- uses: actions/checkout@v3

.github/workflows/windows.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
3+
pull_request:
34
name: "windows"
45
jobs:
56
build_windows:
67
name: Building Windows
8+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
79
runs-on: windows-latest
810
steps:
911
- uses: actions/checkout@v3

dart/test/utils/migration_fixtures.dart

+4
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ END
415415
SELECT CASE
416416
WHEN (NEW.id IS NULL)
417417
THEN RAISE (FAIL, 'id is required')
418+
WHEN (typeof(NEW.id) != 'text')
419+
THEN RAISE (FAIL, 'id should be text')
418420
END;
419421
INSERT INTO "ps_data__lists"
420422
SELECT NEW.id, json_object('description', NEW."description");
@@ -478,6 +480,8 @@ END
478480
SELECT CASE
479481
WHEN (NEW.id IS NULL)
480482
THEN RAISE (FAIL, 'id is required')
483+
WHEN (typeof(NEW.id) != 'text')
484+
THEN RAISE (FAIL, 'id should be text')
481485
END;
482486
INSERT INTO "ps_data__lists"
483487
SELECT NEW.id, json_object('description', NEW."description");

0 commit comments

Comments
 (0)