From 71021bdc42ad63cf9ac542835cf3a9f1c004ac69 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Wed, 23 Aug 2023 15:42:14 -0700 Subject: [PATCH 1/4] Use asg017/sqlite-versions to test multiple SQLite versions. --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4eab1fdb71..00cf906342 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,7 @@ jobs: strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] + sqlite-version: ["3.9", "3.42"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -24,6 +25,9 @@ jobs: key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} restore-keys: | ${{ runner.os }}-pip- + - uses: asg017/sqlite-versions@main + with: + version: ${{ matrix.sqlite-version }} - name: Build extension for --load-extension test run: |- (cd tests && gcc ext.c -fPIC -shared -o ext.so) From bd053ff693d4bdc5f25592ee4644e35d96cf0005 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Wed, 23 Aug 2023 15:43:48 -0700 Subject: [PATCH 2/4] bump a bit newer --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 00cf906342..99816614a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] - sqlite-version: ["3.9", "3.42"] + sqlite-version: ["3.17", "3.42"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} From f41efd4ebcc3714d933d303d2b716172c60282df Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Wed, 23 Aug 2023 15:46:18 -0700 Subject: [PATCH 3/4] dont fail-fast --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99816614a8..8f75297e8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,7 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] sqlite-version: ["3.17", "3.42"] From b895cd2fb308154de67972c485e54497c006f47e Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Wed, 23 Aug 2023 15:51:22 -0700 Subject: [PATCH 4/4] comple flags --- .github/workflows/test.yml | 71 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8f75297e8e..983fa42d69 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,38 +14,39 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] sqlite-version: ["3.17", "3.42"] steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - uses: actions/cache@v3 - name: Configure pip caching - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} - restore-keys: | - ${{ runner.os }}-pip- - - uses: asg017/sqlite-versions@main - with: - version: ${{ matrix.sqlite-version }} - - name: Build extension for --load-extension test - run: |- - (cd tests && gcc ext.c -fPIC -shared -o ext.so) - - name: Install dependencies - run: | - pip install -e '.[test,docs]' - pip freeze - - name: Run tests - run: | - pytest -n auto -m "not serial" - pytest -m "serial" - # And the test that exceeds a localhost HTTPS server - tests/test_datasette_https_server.sh - - name: Check if cog needs to be run - run: | - cog --check docs/*.rst - - name: Check if blacken-docs needs to be run - run: | - # This fails on syntax errors, or a diff was applied - blacken-docs -l 60 docs/*.rst + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/cache@v3 + name: Configure pip caching + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + - uses: asg017/sqlite-versions@main + with: + version: ${{ matrix.sqlite-version }} + cflags: -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY + - name: Build extension for --load-extension test + run: |- + (cd tests && gcc ext.c -fPIC -shared -o ext.so) + - name: Install dependencies + run: | + pip install -e '.[test,docs]' + pip freeze + - name: Run tests + run: | + pytest -n auto -m "not serial" + pytest -m "serial" + # And the test that exceeds a localhost HTTPS server + tests/test_datasette_https_server.sh + - name: Check if cog needs to be run + run: | + cog --check docs/*.rst + - name: Check if blacken-docs needs to be run + run: | + # This fails on syntax errors, or a diff was applied + blacken-docs -l 60 docs/*.rst