updated local docker for ci test on github actions and tests yml

This commit is contained in:
ArnabChatterjee20k
2025-05-20 14:46:50 +05:30
parent f2ed0346df
commit e45befbdf2
3 changed files with 65 additions and 1 deletions
+26
View File
@@ -141,6 +141,11 @@ jobs:
strategy:
fail-fast: false
matrix:
db_adapter:[
MARIADB
POSTGRESQL,
]
service: [
Account,
Avatars,
@@ -192,12 +197,33 @@ jobs:
- name: Run ${{ matrix.service }} tests with Project table mode
run: |
echo "Using project tables"
export _APP_DATABASE_SHARED_TABLES=
export _APP_DATABASE_SHARED_TABLES_V1=
# Set DB Adapter Specific ENV Vars using if-elif
if [ "${{ matrix.db_adapter }}" = "MARIADB" ]; then
export _APP_DB_SCHEME=mariadb
export _APP_DB_HOST=mariadb
export _APP_DB_PORT=3306
export _APP_DB_SCHEMA=appwrite
elif [ "${{ matrix.db_adapter }}" = "POSTGRESQL" ]; then
export _APP_DB_SCHEME=postgresql
export _APP_DB_HOST=postgresql
export _APP_DB_PORT=5432
export _APP_DB_SCHEMA=appwrite
else
echo "Unknown DB adapter: ${{ matrix.db_adapter }}"
exit 1
fi
docker compose exec -T \
-e _APP_DATABASE_SHARED_TABLES \
-e _APP_DATABASE_SHARED_TABLES_V1 \
-e _APP_DB_SCHEME \
-e _APP_DB_HOST \
-e _APP_DB_PORT \
-e _APP_DB_SCHEMA \
appwrite test /usr/src/code/tests/e2e/Services/${{ matrix.service }} --debug --exclude=devKeys
e2e_shared_mode_test: