Skip to content

Commit c496822

Browse files
committed
CI: fix SQLx compilation errors in lint workflow
- Add sqlite3 to build dependencies - Initialize SQLite database with heartbeats-processor schema - Set DATABASE_URL to file-based SQLite database for SQLx validation - Enables compile-time query checking for heartbeats-processor Fixes "set DATABASE_URL to use query macros online" errors in CI
1 parent aae8f15 commit c496822

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/lint.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,22 @@ jobs:
1818
- name: Setup build dependencies
1919
run: |
2020
sudo apt update || true
21-
sudo apt install -y protobuf-compiler || true
21+
sudo apt install -y protobuf-compiler sqlite3 || true
22+
- name: Setup SQLite database for SQLx
23+
run: |
24+
sqlite3 /tmp/heartbeats.db < tools/heartbeats-processor/schema.sql
2225
- uses: dtolnay/rust-toolchain@stable
2326
with:
2427
toolchain: ${{ matrix.toolchain }}
2528
components: clippy, rustfmt
2629
- name: Run make check
2730
run: make check
31+
env:
32+
DATABASE_URL: "sqlite:///tmp/heartbeats.db"
2833
- name: Run make lint
2934
run: make lint
35+
env:
36+
DATABASE_URL: "sqlite:///tmp/heartbeats.db"
3037

3138
lint-tx-fuzzing:
3239
name: Lint transaction Fuzzing - ${{ matrix.os }} - Rust ${{ matrix.toolchain }}

0 commit comments

Comments
 (0)