chore: fix recursive tests

This commit is contained in:
Chirag Aggarwal
2025-01-28 17:49:05 +00:00
parent c73f2afbe1
commit 28e1ce9dc2
+3 -15
View File
@@ -14,25 +14,12 @@ jobs:
setup:
name: Setup & Build Appwrite Image
runs-on: ubuntu-latest
outputs:
test_suffixes: ${{ steps.detect-tests.outputs.test_suffixes }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Detect test types
id: detect-tests
run: |
ABUSE_ENABLED=$(grep -oP '^_APP_OPTIONS_ABUSE=\K\w+' .env || echo 'disabled')
if [ "$ABUSE_ENABLED" = "enabled" ]; then
echo 'test_suffixes=["CustomClient", "CustomServer"]' >> $GITHUB_OUTPUT
else
echo 'test_suffixes=["ConsoleClient"]' >> $GITHUB_OUTPUT
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -140,7 +127,6 @@ jobs:
Messaging,
Migrations
]
test_suffix: ${{ fromJSON(needs.setup.outputs.test_suffixes) }}
tables-mode: [
'Project',
'Shared V1',
@@ -180,7 +166,9 @@ jobs:
export _APP_DATABASE_SHARED_TABLES_V1=
fi
TEST_SUFFIXES=${{ matrix.test_suffix }}
ABUSE_ENABLED=$(grep -oP '^_APP_OPTIONS_ABUSE=\K\w+' .env || echo 'disabled')
TEST_SUFFIXES=$( [[ "$ABUSE_ENABLED" == "enabled" ]] && echo 'CustomClient CustomServer' || echo 'ConsoleClient')
TEST_FOLDER="/usr/src/code/tests/e2e/Services/${{ matrix.service }}"
ALL_TEST_FILES=$(docker compose exec -T appwrite find "$TEST_FOLDER" -type f -name "*Test.php")