Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/actions/seed-ditto-document/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ description: 'Creates a test document in Ditto Cloud with inverted timestamp for
author: 'Ditto'

inputs:
ditto-api-key:
description: 'Ditto API key for authentication'
ditto-app-id:
description: 'Ditto App ID'
required: true
ditto-api-url:
description: 'Ditto API URL (e.g., cloud.ditto.live)'
ditto-playground-token:
description: 'Ditto Playground Token for authentication'
required: true
app-name:
description: 'Name of the app/platform being tested (e.g., android-kotlin, swift, etc.)'
Expand All @@ -31,6 +31,7 @@ runs:
id: seed
shell: bash
run: |
set -euo pipefail
# Generate inverted timestamp for top position in list
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
Expand All @@ -45,9 +46,9 @@ runs:
echo "📝 Timestamp: ${TIMESTAMP} → Inverted: ${INVERTED_TIMESTAMP}"

# Insert document using Ditto API v4
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ inputs.ditto-api-key }}" \
-H "Authorization: Bearer ${{ inputs.ditto-playground-token }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -59,7 +60,7 @@ runs:
}
}
}" \
"https://${{ inputs.ditto-api-url }}/api/v4/store/execute")
"https://${{ inputs.ditto-app-id }}.cloud.ditto.live/api/v4/store/execute")

# Extract HTTP status code and response body (portable version)
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/android-cpp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -192,7 +192,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/android-java-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -184,7 +184,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/android-kotlin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -202,7 +202,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cpp-tui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ jobs:
id: seed
uses: ./.github/actions/seed-ditto-document
with:
ditto-api-key: ${{ secrets.DITTO_API_KEY }}
ditto-api-url: ${{ secrets.DITTO_API_URL }}
ditto-app-id: ${{ secrets.DITTO_APP_ID }}
ditto-playground-token: ${{ secrets.DITTO_PLAYGROUND_TOKEN }}
app-name: 'cpp-tui'

- name: Download and setup Ditto C++ SDK
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dotnet-maui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -225,7 +225,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down Expand Up @@ -337,9 +337,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -351,7 +351,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-tui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ jobs:
id: seed
uses: ./.github/actions/seed-ditto-document
with:
ditto-api-key: ${{ secrets.DITTO_API_KEY }}
ditto-api-url: ${{ secrets.DITTO_API_URL }}
ditto-app-id: ${{ secrets.DITTO_APP_ID }}
ditto-playground-token: ${{ secrets.DITTO_PLAYGROUND_TOKEN }}
app-name: 'dotnet-tui'

- name: Build .NET application
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-winforms-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ jobs:
id: seed
uses: ./.github/actions/seed-ditto-document
with:
ditto-api-key: ${{ secrets.DITTO_API_KEY }}
ditto-api-url: ${{ secrets.DITTO_API_URL }}
ditto-app-id: ${{ secrets.DITTO_APP_ID }}
ditto-playground-token: ${{ secrets.DITTO_PLAYGROUND_TOKEN }}
app-name: 'dotnet-winforms'

- name: Build and run integration test
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/flutter-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ jobs:
echo "📝 Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -448,7 +448,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down Expand Up @@ -700,9 +700,9 @@ jobs:
echo "📝 Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -714,7 +714,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/java-server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -238,7 +238,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/javascript-tui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ jobs:
id: seed
uses: ./.github/actions/seed-ditto-document
with:
ditto-api-key: ${{ secrets.DITTO_API_KEY }}
ditto-api-url: ${{ secrets.DITTO_API_URL }}
ditto-app-id: ${{ secrets.DITTO_APP_ID }}
ditto-playground-token: ${{ secrets.DITTO_PLAYGROUND_TOKEN }}
app-name: 'javascript-tui'

- name: Run integration test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/javascript-web-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -163,7 +163,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/kotlin-multiplatform-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -386,7 +386,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/react-native-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -258,7 +258,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down Expand Up @@ -431,9 +431,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -445,7 +445,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/react-native-expo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -254,7 +254,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down Expand Up @@ -432,9 +432,9 @@ jobs:
echo "Seeding test task to Ditto Cloud..."
TIMESTAMP=$(date +%s)
INVERTED_TIMESTAMP=$((9999999999 - TIMESTAMP))
SEED_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST \
SEED_RESPONSE=$(curl -fSs -w "\n%{http_code}" -X POST \
-H 'Content-type: application/json' \
-H "Authorization: Bearer ${{ secrets.DITTO_API_KEY }}" \
-H "Authorization: Bearer ${{ secrets.DITTO_PLAYGROUND_TOKEN }}" \
-d "{
\"statement\": \"INSERT INTO tasks DOCUMENTS (:newTask) ON ID CONFLICT DO UPDATE\",
\"args\": {
Expand All @@ -446,7 +446,7 @@ jobs:
}
}
}" \
"https://${{ secrets.DITTO_API_URL }}/api/v4/store/execute")
"https://${{ secrets.DITTO_APP_ID }}.cloud.ditto.live/api/v4/store/execute")

HTTP_CODE=$(echo "$SEED_RESPONSE" | tail -n1)
BODY=$(echo "$SEED_RESPONSE" | sed '$d')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-tui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ jobs:
id: seed
uses: ./.github/actions/seed-ditto-document
with:
ditto-api-key: ${{ secrets.DITTO_API_KEY }}
ditto-api-url: ${{ secrets.DITTO_API_URL }}
ditto-app-id: ${{ secrets.DITTO_APP_ID }}
ditto-playground-token: ${{ secrets.DITTO_PLAYGROUND_TOKEN }}
Comment thread
alycda marked this conversation as resolved.
app-name: 'rust-tui'

- name: Build and run integration test
Expand Down
Loading
Loading