-
Notifications
You must be signed in to change notification settings - Fork 1.1k
116 lines (108 loc) · 3.45 KB
/
Copy pathsqltest.yml
File metadata and controls
116 lines (108 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: SQL Tests
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
sqltest-check:
name: Check .sqltest syntax
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "v1-rust"
- name: Build test runner
run: make -C testing/sqltests build-runner
- name: Check test syntax
run: make -C testing/sqltests check
sqltest-run-cli:
name: Run SQL tests (CLI backend)
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "v1-rust"
- uses: "./.github/shared/setup-sccache"
- uses: "./.github/shared/install_sqlite"
- name: Build tursodb
run: make -C testing/sqltests build-tursodb
- name: Build test runner
run: make -C testing/sqltests build-runner
- name: Run tests
run: make -C testing/sqltests run-cli CROSS_CHECK_BINARY=sqlite3
- name: Run tests (MVCC)
run: make -C testing/sqltests run-cli MVCC=1
sqltest-run-rust:
name: Run SQL tests (Rust backend)
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "v1-rust"
- name: Build test runner
run: make -C testing/sqltests build-runner
- name: Run tests
run: make -C testing/sqltests run-rust
- name: Run tests (MVCC)
run: make -C testing/sqltests run-rust MVCC=1
sqltest-run-js:
name: Run SQL tests (JS backend)
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
defaults:
run:
working-directory: bindings/javascript
steps:
- uses: actions/checkout@v4
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "v1-rust"
- name: Setup node
uses: useblacksmith/setup-node@v5
with:
node-version: 20
- uses: "./.github/shared/setup-sccache"
- name: Install JS dependencies
run: yarn install
- name: Build common package
run: yarn workspace @tursodatabase/database-common build
- name: Build native bindings
run: yarn workspace @tursodatabase/database napi-build --target x86_64-unknown-linux-gnu
- name: Build TypeScript
run: yarn workspace @tursodatabase/database tsc-build
- name: Build test runner
working-directory: testing/sqltests
run: cargo build --release
- name: Run tests
working-directory: testing/sqltests
run: make run-js
- name: Run tests (MVCC)
working-directory: testing/sqltests
run: make run-js MVCC=1
sqltest-sqlite:
name: Run SQL tests (SQLite)
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: useblacksmith/rust-cache@v3
with:
prefix-key: "v1-rust"
- uses: "./.github/shared/install_sqlite"
- name: Build test runner
run: make -C testing/sqltests build-runner
- name: Run tests against SQLite
run: make -C testing/sqltests test-sqlite