Skip to content

Commit 876eb7a

Browse files
authored
refactor: add unified storage abstraction and SQLite backend support (#270)
1 parent 00bdfbe commit 876eb7a

File tree

45 files changed

+3507
-4496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3507
-4496
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
rustup target add wasm32-unknown-unknown
3838
- name: Lint Check
3939
run: make clippy
40+
- name: Lint Check (SQLite)
41+
run: make clippy-sqlite
4042
test-wasm:
4143
name: Tests / Build & Test (Wasm)
4244
needs: [ rustfmt, clippy ]
@@ -91,6 +93,20 @@ jobs:
9193
- name: UnitTest
9294
if: matrix.os == 'macos-latest'
9395
run: make test-portable
96+
test-sqlite:
97+
name: Tests / Build & Test (SQLite)
98+
needs: [ rustfmt, clippy ]
99+
runs-on: ${{ matrix.os }}
100+
strategy:
101+
matrix:
102+
os: [ ubuntu-latest, macos-latest, windows-2022 ]
103+
steps:
104+
- name: Checkout the Repository
105+
uses: actions/checkout@v4
106+
- name: Install cargo-nextest
107+
uses: taiki-e/install-action@nextest
108+
- name: UnitTest (SQLite)
109+
run: make test-sqlite
94110
code_coverage:
95111
name: Code Coverage
96112
needs: [ test ]

Cargo.lock

Lines changed: 88 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ clippy:
1414
cargo clippy --target wasm32-unknown-unknown -p light-client-wasm -p ckb-light-client-lib -p light-client-db-common -p light-client-db-worker --locked -- --deny warnings
1515
# Run clippy for native targets
1616
cargo clippy -p ckb-light-client --locked -- --deny warnings
17+
18+
clippy-sqlite:
19+
# Run clippy for native targets with sqlite feature
20+
cargo clippy --features sqlite -p ckb-light-client-lib -p ckb-light-client --locked -- --deny warnings
21+
1722
build:
1823
cargo build
1924

@@ -27,6 +32,9 @@ test:
2732
test-portable:
2833
cargo nextest run --features portable --hide-progress-bar --success-output immediate --failure-output immediate -p ckb-light-client-lib -p ckb-light-client
2934

35+
test-sqlite:
36+
cargo nextest run --features sqlite --hide-progress-bar --success-output immediate --failure-output immediate -p ckb-light-client-lib -p ckb-light-client
37+
3038
test-wasm:
3139
wasm-pack test --node ./wasm/light-client-db-common/
3240

0 commit comments

Comments
 (0)