mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-17 19:21:50 +02:00
Compare commits
2 commits
03946cdae6
...
7c2a426404
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7c2a426404 | ||
![]() |
41118fda23 |
3 changed files with 28 additions and 1 deletions
|
@ -6,6 +6,7 @@ tests:
|
|||
image: python:3.11
|
||||
variables:
|
||||
DJANGO_SETTINGS_MODULE: "la_chariotte.settings"
|
||||
DB_ENGINE: "django.db.backends.postgresql"
|
||||
DB_NAME: "postgres"
|
||||
DB_USER: "postgres"
|
||||
DB_PASSWORD: "mysecretpassword"
|
||||
|
@ -30,3 +31,21 @@ tests:
|
|||
- git fetch origin develop ; diff-cover coverage.xml --fail-under=90 --compare-branch origin/develop --diff-range-notation '..'
|
||||
- echo "Tests done."
|
||||
|
||||
sqlite:
|
||||
stage: test
|
||||
image: python:3.11
|
||||
variables:
|
||||
DJANGO_SETTINGS_MODULE: "la_chariotte.settings"
|
||||
script:
|
||||
- export CACHE_PATH="/venvs/${CI_PROJECT_NAME}/$(date +week-%V-%Y)"
|
||||
- if [[ "$CI_COMMIT_BRANCH" == *"--no-cache"* ]] ; then export CACHE_PATH="/venvs/$CI_COMMIT_SHORT_SHA"; fi
|
||||
- echo "Creating virtual env..."
|
||||
- if [ ! -d $CACHE_PATH/venv ] ; then python3.11 -m venv $CACHE_PATH/venv ; fi
|
||||
- $CACHE_PATH/venv/bin/pip install --upgrade pip
|
||||
- echo "Virtual env created."
|
||||
- echo "Checking database migrations with sqlite..."
|
||||
- source $CACHE_PATH/venv/bin/activate
|
||||
- pip cache purge
|
||||
- pip install -e ".[dev]"
|
||||
- python3 manage.py migrate
|
||||
- echo "sqlite database migrations successful"
|
||||
|
|
|
@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
since 0.4.1, and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## UNRELEASED (XXXX-YY-ZZ)
|
||||
|
||||
### Added
|
||||
|
||||
- SQLite is now a supported database engine for easier deployment;
|
||||
use `"ENGINE": "django.db.backends.sqlite3"` in the settings to enable it;
|
||||
the `"NAME"` setting is a relative path for the DB file, from the working directory
|
||||
|
||||
## 1.3.0 (2024-11-02)
|
||||
|
||||
This is a small release, with a few features and bugfixes. The code is now
|
||||
|
|
|
@ -85,7 +85,7 @@ WSGI_APPLICATION = "la_chariotte.wsgi.application"
|
|||
|
||||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
"ENGINE": os.getenv("DB_ENGINE", "django.db.backends.sqlite3"),
|
||||
"NAME": os.getenv("DB_NAME", "chariotte.sqlite3"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue