Skip to content

Commit c108753

Browse files
committed
python-versions test with different django versions
1 parent 0696196 commit c108753

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
strategy:
106106
matrix:
107107
version: [3.11, 3.12, 3.13]
108+
django_version: [3.2, 4.2]
108109
steps:
109110
- name: Install websocat
110111
uses: baptiste0928/cargo-install@v3
@@ -125,6 +126,7 @@ jobs:
125126
env:
126127
POSTGRES_URL: postgres://postgres:mysecretpassword@localhost:5432/postgres
127128
PYTHON_VERSION: ${{ matrix.version }}
129+
DJANGO_VERSION: ${{ matrix.django_version }}
128130

129131
io_tests:
130132
name: DB.io - Unit Tests

script/cli_test.sh

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,21 @@ DJANGO_PORT=${DJANGO_PORT:-9001}
2222
POSTGRES_HOST=${POSTGRES_HOST:-localhost}
2323
POSTGRES_PORT=${POSTGRES_PORT:-5432}
2424
PYTHON_VERSION=${PYTHON_VERSION:-3.13}
25-
26-
echo "Config file: ${PROJECT_FILE}"
27-
echo "Temp dir: ${DIR}"
28-
echo "Temp tar: ${TEMP_TAR}"
29-
echo "Django port: ${DJANGO_PORT}"
30-
echo "Postgres host: ${POSTGRES_HOST}"
31-
echo "Postgres port: ${POSTGRES_PORT}"
32-
echo "Project name: ${PROJECT_NAME}"
25+
DJANGO_VERSION=${DJANGO_VERSION:-4.2}
26+
UPDATED_PROJECT_FILE="${DIR}/project-python-${PYTHON_VERSION}-django-${DJANGO_VERSION}.json"
27+
28+
jq -s '.[0] * {"version": env.DJANGO_VERSION}' ${PROJECT_FILE} > ${UPDATED_PROJECT_FILE}
29+
30+
echo "Base Config file : ${PROJECT_FILE}"
31+
echo "Temp dir : ${DIR}"
32+
echo "Temp tar : ${TEMP_TAR}"
33+
echo "Updated Config file : ${UPDATED_PROJECT_FILE}"
34+
echo "Django port : ${DJANGO_PORT}"
35+
echo "Postgres host : ${POSTGRES_HOST}"
36+
echo "Postgres port : ${POSTGRES_PORT}"
37+
echo "Project name : ${PROJECT_NAME}"
38+
echo "Python version : ${PYTHON_VERSION}"
39+
echo "Django version : ${DJANGO_VERSION}"
3340

3441
if [ -z "${PROJECT_NAME}" ]; then
3542
echo "Project name is required"
@@ -45,7 +52,7 @@ if [ -n "${START_DOCKER}" ]; then
4552
done
4653
fi
4754

48-
yarn run cli ${PROJECT_FILE} ${TEMP_TAR}
55+
yarn run cli ${UPDATED_PROJECT_FILE} ${TEMP_TAR}
4956

5057
cd ${DIR}
5158
tar -xvf ${TEMP_TAR}

0 commit comments

Comments
 (0)