Skip to content

Workaround issues in latest libsql release #9

Workaround issues in latest libsql release

Workaround issues in latest libsql release #9

Workflow file for this run

---
# Borrowed heavily from django-snowflake
# https://github.com/Snowflake-Labs/django-snowflake/blob/25c603482b39109509eb2a549672cd9404e5dc6c/.github/workflows/tests.yml
name: Tests
on: [push]
jobs:
django-tests:
runs-on: ubuntu-latest
name: Django Test Suite
steps:
- name: Checkout django-libsql
uses: actions/checkout@v3
- name: Checkout Django
uses: actions/checkout@v3
with:
repository: 'django/django'
ref: '4.2'
path: 'django_repo'
- name: Setup sqld server
run: |
# Databases are handled by host header
echo -e "127.0.0.1 testdb.local\n127.0.0.1 testotherdb.local\n127.0.0.1 db.local\n127.0.0.1 otherdb.local" | sudo tee -a /etc/hosts
# Start the server
docker run --rm --detach -p 8080:8080 --name sqld ghcr.io/libsql/sqld:latest
- name: Install system packages for Django's Python test dependencies
run: |
sudo apt-get update
sudo apt-get install libmemcached-dev
- name: Install Django and its Python test dependencies
run: |
pip3 install -U pip
cd django_repo/tests/
pip3 install -e ..
pip3 install -r requirements/py3.txt
- name: install the django-libsql backend
run: pip3 install .
- name: Copy the test settings file
run: cp .github/workflows/libsql_settings.py django_repo/tests/
- name: Run the tests
run: |
export LIBSQL_AUTH_TOKEN=""
export LIBSQL_SYNC_URL=http://db.local:8080
export OTHER_LIBSQL_SYNC_URL=http://otherdb.local:8080
python3 django_repo/tests/runtests.py --settings libsql_settings -v 2
aggregation
aggregation_regress
annotations
backends
basic
bulk_create
dates
datetimes
db_functions
expressions
expressions_window
inspectdb
introspection
lookup
migrations
model_fields
queries
schema
timezones
- name: Stop sqld server
if: always()
run: docker ps | grep sqld && docker kill sqld