From 28e1ce9dc24f9df4d5c40bcd7510fe53f1bcc865 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 28 Jan 2025 17:49:05 +0000 Subject: [PATCH] chore: fix recursive tests --- .github/workflows/tests.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2978afeaba..ac222c1df7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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")