Compare commits

...

4 Commits

Author SHA1 Message Date
Etienne 4f3c45aff3 test 2026-05-12 18:44:17 +02:00
Etienne 803e3ece5a Merge branch 'main' into ej/fix-api-changes-report 2026-05-12 18:19:41 +02:00
Etienne 02e7c54043 test-ci 2026-04-02 19:04:29 +02:00
Etienne 66d088a89d fix 2026-04-02 18:41:36 +02:00
2 changed files with 20 additions and 10 deletions
+16 -10
View File
@@ -1,7 +1,7 @@
name: GraphQL and OpenAPI Breaking Changes Detection
on:
pull_request:
pull_request:
types: [opened, synchronize, edited]
branches:
- main
@@ -54,7 +54,7 @@ jobs:
image: clickhouse/clickhouse-server:25.8.8
env:
CLICKHOUSE_PASSWORD: clickhousePassword
CLICKHOUSE_URL: "http://default:clickhousePassword@localhost:8123/twenty"
CLICKHOUSE_URL: 'http://default:clickhousePassword@localhost:8123/twenty'
ports:
- 8123:8123
- 9000:9000
@@ -235,7 +235,6 @@ jobs:
echo "Current branch files downloaded:"
ls -la current-*
- name: Preserve current branch files
run: |
# Create a temp directory to store current branch files
@@ -305,7 +304,7 @@ jobs:
set_env_var "PG_DATABASE_URL" "postgres://postgres:postgres@localhost:5432/main_branch"
set_env_var "NODE_PORT" "${{ env.MAIN_SERVER_PORT }}"
set_env_var "REDIS_URL" "redis://localhost:6379"
set_env_var "REDIS_URL" "redis://localhost:6379/1"
set_env_var "CLICKHOUSE_URL" "http://default:clickhousePassword@localhost:8123/twenty"
set_env_var "CLICKHOUSE_PASSWORD" "clickhousePassword"
@@ -402,7 +401,6 @@ jobs:
echo "Main branch files downloaded:"
ls -la main-*
- name: Restore current branch files
run: |
# Move current branch files back to working directory
@@ -422,9 +420,8 @@ jobs:
for file in main-schema-introspection.json current-schema-introspection.json \
main-metadata-schema-introspection.json current-metadata-schema-introspection.json; do
if [ ! -f "$file" ]; then
echo "::warning::Missing GraphQL schema file: $file"
valid=false
if [ ! -f "$file" ] || ! jq empty "$file" 2>/dev/null; then
echo "::warning::Invalid or missing schema file: $file"
elif ! jq -e '.data.__schema' "$file" >/dev/null 2>&1; then
echo "::warning::File $file is not a valid GraphQL introspection result. First 200 bytes: $(head -c 200 "$file")"
valid=false
@@ -439,6 +436,17 @@ jobs:
elif ! jq -e '.openapi // .swagger' "$file" >/dev/null 2>&1; then
echo "::warning::File $file is not a valid OpenAPI spec. First 200 bytes: $(head -c 200 "$file")"
valid=false
elif ! jq -e '.data.__schema' "$file" > /dev/null 2>&1; then
echo "::warning::Schema file is not a valid GraphQL introspection response: $file"
valid=false
fi
done
for file in main-rest-api.json current-rest-api.json \
main-rest-metadata-api.json current-rest-metadata-api.json; do
if [ ! -f "$file" ] || ! jq empty "$file" 2>/dev/null; then
echo "::warning::Invalid or missing REST API file: $file"
valid=false
fi
done
@@ -652,5 +660,3 @@ jobs:
if [ -f /tmp/main-server.pid ]; then
kill $(cat /tmp/main-server.pid) || true
fi
@@ -8,4 +8,8 @@ export class ResendEmailVerificationTokenInput {
@IsEmail()
@IsNotEmpty()
email: string;
@Field(() => String)
@IsNotEmpty()
fieldToTriggerBreakingChange: string;
}