diff --git a/.github/workflows/studio-test.yml b/.github/workflows/studio-test.yml index c74f5e9b4..8828b2df0 100644 --- a/.github/workflows/studio-test.yml +++ b/.github/workflows/studio-test.yml @@ -59,7 +59,7 @@ jobs: integration: - name: test - ${{ split(matrix.chunk)[-1] }} + name: test - ${{ matrix.chunk[0] }} runs-on: ubuntu-latest needs: - setup @@ -76,10 +76,18 @@ jobs: node-version-file: '.nvmrc' cache: yarn - - name: Install dependencies - run: yarn install --frozen-lockfile + - name: yarn install (with retry) + uses: nick-fields/retry@v2 + with: + timeout_minutes: 20 + max_attempts: 3 + command: "yarn install --frozen-lockfile --network-timeout 100000" - - name: Integration Tests - run: yarn workspace beekeeper-studio run test:integration --runInBand --ci --silent ${{ matrix.chunk }} + - name: Test + uses: nick-fields/retry@v2 + with: + timeout_minutes: 20 + max_attempts: 3 + command: yarn workspace beekeeper-studio run test:integration --runInBand --ci --silent ${{ matrix.chunk[1] }} env: TESTCONTAINERS_RYUK_DISABLED: true diff --git a/bin/get-db-files-as-json.sh b/bin/get-db-files-as-json.sh index 480cda217..d31548b1d 100755 --- a/bin/get-db-files-as-json.sh +++ b/bin/get-db-files-as-json.sh @@ -1,8 +1,9 @@ #!/bin/bash -# Use $(...) for command substitution +# Use $(...) for command substitution to capture output of find command FILES=$(find apps/studio/tests/integration/lib/db -name "*spec.js") -# Convert to JSON array directly -JSON=$(echo "$FILES" | jq -Rsc 'split("\n") | if last == "" then .[:-1] else . end') -echo "$JSON" +# Convert output to a JSON array of arrays with filename and full path +JSON=$(echo "$FILES" | jq -Rsc 'split("\n") | map(select(. != "") | [(. | split("/") | last), .])') + +echo "$JSON" \ No newline at end of file