-
Notifications
You must be signed in to change notification settings - Fork 28
81 lines (70 loc) · 2.46 KB
/
test-database-processing.yml
File metadata and controls
81 lines (70 loc) · 2.46 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
name: Test Database Processing
on:
push:
pull_request:
workflow_dispatch:
jobs:
test-database-processing:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies (7z)
run: |
sudo apt-get update
sudo apt-get install -y p7zip-full unzip
- name: Install SQLite from official release
run: |
# Ubuntu's SQLite 3.45.1 has a bug causing segfaults with complex views
# Download official precompiled SQLite 3.50.4 instead
SQLITE_VERSION=3500400
SQLITE_YEAR=2025
wget https://www.sqlite.org/${SQLITE_YEAR}/sqlite-tools-linux-x64-${SQLITE_VERSION}.zip
unzip sqlite-tools-linux-x64-${SQLITE_VERSION}.zip
ls -la
sudo cp sqlite3 /usr/local/bin/
sudo chmod +x /usr/local/bin/sqlite3
# Make sure /usr/local/bin is in PATH first
echo "/usr/local/bin" >> $GITHUB_PATH
- name: Verify installations and SQLite versions
run: |
echo "=== 7z version ==="
7z --help | head -5
echo ""
echo "=== System sqlite3 version ==="
/usr/local/bin/sqlite3 --version
echo ""
echo "=== Python sqlite3 module version ==="
python -c "import sqlite3; print('Python sqlite3 module uses SQLite version:', sqlite3.sqlite_version)"
- name: Extract latest.7z
run: |
echo "Extracting latest.7z..."
7z x latest.7z
echo "Extraction complete."
ls -lh latest.db
- name: Run create_views.sh
run: |
echo "Running create_views.sh..."
chmod +x scripts/create_views.sh
scripts/create_views.sh latest.db
echo "Views created successfully."
- name: Verify database integrity
run: |
echo "Checking database integrity..."
sqlite3 latest.db "PRAGMA integrity_check;"
echo "Verifying views exist..."
sqlite3 latest.db "SELECT name FROM sqlite_master WHERE type='view' ORDER BY name;"
echo "All checks passed!"
- name: Upload database for debugging
if: always()
uses: actions/upload-artifact@v4
with:
name: debug-db
path: latest.db
retention-days: 7