Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/doltlite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---

name: doltlite

on: # yamllint disable-line rule:truthy
push:
branches:
- 2.x
pull_request: null

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
sqlite:
# DoltLite is a SQLite fork exporting the sqlite3_* API: preloaded, it replaces libsqlite3 under pdo_sqlite.
# The preload does not reach setup-php's pdo_sqlite, so the tests run in the official image, whose pdo_sqlite
# links libsqlite3 dynamically; Composer and dload stay on the host PHP.
name: SQLite suites on DoltLite · PHP ${{ matrix.php }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
php:
- '8.4'
steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v7
with:
persist-credentials: false

- name: 🛠️ Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, pdo_sqlite, mbstring
ini-values: error_reporting=E_ALL, memory_limit=-1
coverage: none

- name: 📥 Install dependencies with composer
uses: ramsey/composer-install@v4
env:
COMPOSER_ROOT_VERSION: 2.x-dev
with:
dependency-versions: locked

- name: 📥 Download DoltLite
env:
GITHUB_TOKEN: ${{ github.token }}
run: vendor/bin/dload get doltlite --path=runtime/doltlite

- name: ℹ️ Check that pdo_sqlite runs on DoltLite
run: >-
docker run --rm -v "$PWD:/app" -w /app -e LD_PRELOAD=/app/runtime/doltlite/libdoltlite.so php:${{ matrix.php }}-cli
php -r 'echo (new PDO("sqlite::memory:"))->query("SELECT dolt_version()")->fetchColumn(), PHP_EOL;'

- name: 🧪 SQLite tests
run: >-
docker run --rm -v "$PWD:/app" -w /app -e LD_PRELOAD=/app/runtime/doltlite/libdoltlite.so php:${{ matrix.php }}-cli
php vendor/bin/testo --suite=Feature/SQLite --suite=Regression/SQLite

...
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"buggregator/trap": "^1.20",
"cycle/testing": "^0.1.2",
"ergebnis/composer-normalize": "^2.58",
"internal/dload": "^1.19",
"llm/skills": "^1.20",
"mockery/mockery": "^1.6",
"roxblnfk/unpoly": "^1.8",
Expand Down
Loading
Loading