Skip to content

Commit 7566cda

Browse files
committed
Add roundtrip export to database checks
1 parent b846359 commit 7566cda

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,21 @@ jobs:
183183

184184
- name: Export empty SQLite DB to Postgres
185185
run: ./target/debug/sqlite-to-postgres "$(mktemp)" 'postgresql://postgres:postgres@localhost:5432/postgres'
186+
187+
- name: Roundtrip export
188+
run: |
189+
sudo apt-get update
190+
sudo apt-get install -y wget python3-snappy sqlite3
191+
192+
wget -q 'http://perf-data.rust-lang.org/export.db.sz'
193+
python3 -m snappy -d export.db.sz > before.db
194+
195+
./target/debug/sqlite-to-postgres before.db 'postgresql://postgres:postgres@localhost:5432/postgres'
196+
sqlite3 before.db .dump > before.dump
197+
198+
rm before.db
199+
200+
./target/debug/postgres-to-sqlite 'postgresql://postgres:postgres@localhost:5432/postgres' after.db
201+
sqlite3 after.db .dump > after.dump
202+
203+
diff -w before.dump after.dump

0 commit comments

Comments
 (0)