Skip to content

Commit 06f6666

Browse files
authored
Merge pull request ambitioninc#14 from ambitioninc/chore/rtd-config-v2
read the docs config v2 and github actions
2 parents ea13d6b + a489260 commit 06f6666

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

.readthedocs.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.8"
7+
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
python:
12+
install:
13+
- requirements: requirements/docs.txt
14+
- requirements: requirements/setup.txt

docs/release_notes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Release Notes
22
=============
33

4+
v0.3.1
5+
------
6+
* Read the Docs config file v2
7+
48
v0.3.0
59
------
610

dynamic_db_router/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.3.0'
1+
__version__ = '0.3.1'

settings.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
import json
23

34
from django.conf import settings
45

@@ -33,6 +34,15 @@ def configure_settings():
3334
else:
3435
raise RuntimeError('Unsupported test DB {0}'.format(test_db))
3536

37+
# Check env for db override (used for github actions)
38+
if os.environ.get('DB_SETTINGS_ONE'):
39+
db_config_one = json.loads(os.environ.get('DB_SETTINGS_ONE'))
40+
41+
# Check env for db override (used for github actions)
42+
if os.environ.get('DB_SETTINGS_TWO'):
43+
db_config_two = json.loads(os.environ.get('DB_SETTINGS_TWO'))
44+
45+
3646
settings.configure(
3747
DATABASES={
3848
'default': db_config_one,

0 commit comments

Comments
 (0)