|
| 1 | +name: Test SQLite versions |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +permissions: |
| 6 | + contents: read |
| 7 | + |
| 8 | +jobs: |
| 9 | + test: |
| 10 | + runs-on: ${{ matrix.platform }} |
| 11 | + continue-on-error: true |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + platform: [ubuntu-latest] |
| 15 | + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"] |
| 16 | + sqlite-version: [ |
| 17 | + #"3", # latest version |
| 18 | + "3.46", |
| 19 | + #"3.45", |
| 20 | + #"3.27", |
| 21 | + #"3.26", |
| 22 | + "3.25", |
| 23 | + #"3.25.3", # 2018-09-25, window functions breaks test_upsert for some reason on 3.10, skip for now |
| 24 | + #"3.24", # 2018-06-04, added UPSERT support |
| 25 | + #"3.23.1" # 2018-04-10, before UPSERT |
| 26 | + ] |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + - name: Set up Python ${{ matrix.python-version }} |
| 30 | + uses: actions/setup-python@v5 |
| 31 | + with: |
| 32 | + python-version: ${{ matrix.python-version }} |
| 33 | + allow-prereleases: true |
| 34 | + cache: pip |
| 35 | + cache-dependency-path: setup.py |
| 36 | + - name: Set up SQLite ${{ matrix.sqlite-version }} |
| 37 | + uses: asg017/sqlite-versions@71ea0de37ae739c33e447af91ba71dda8fcf22e6 |
| 38 | + with: |
| 39 | + version: ${{ matrix.sqlite-version }} |
| 40 | + cflags: "-DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_JSON1" |
| 41 | + - run: python3 -c "import sqlite3; print(sqlite3.sqlite_version)" |
| 42 | + - run: echo $LD_LIBRARY_PATH |
| 43 | + - name: Build extension for --load-extension test |
| 44 | + run: |- |
| 45 | + (cd tests && gcc ext.c -fPIC -shared -o ext.so) |
| 46 | + - name: Install dependencies |
| 47 | + run: | |
| 48 | + pip install -e '.[test]' |
| 49 | + pip freeze |
| 50 | + - name: Run tests |
| 51 | + run: | |
| 52 | + pytest -n auto -m "not serial" |
| 53 | + pytest -m "serial" |
0 commit comments