Skip to content

Commit 85210bc

Browse files
author
Nicki Nixon
committed
on: pull_request, remove path
1 parent 5c4868f commit 85210bc

1 file changed

Lines changed: 12 additions & 35 deletions

File tree

.github/workflows/sdk-generation-validation.yml

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: SDK Generation Validation
22

33
on:
4-
pull_request:
5-
paths:
6-
- 'openapi/mx_platform_api.yml'
4+
pull_request
5+
# paths:
6+
# - 'openapi/mx_platform_api.yml'
77

88
jobs:
99
validate-sdk-generation:
@@ -65,7 +65,7 @@ jobs:
6565
- name: Create output directory
6666
run: mkdir -p ./sdk-output/${{ matrix.language }}
6767

68-
- name: Generate SDK
68+
- name: Generate Test SDK
6969
run: |
7070
openapi-generator-cli generate \
7171
-i openapi/mx_platform_api.yml \
@@ -84,13 +84,11 @@ jobs:
8484
case "${{ matrix.language }}" in
8585
"java")
8686
test -f pom.xml || (echo "❌ Missing pom.xml" && exit 1)
87-
test -d src || (echo "❌ Missing src directory" && exit 1)
8887
find src -name "*.java" | head -1 > /dev/null || (echo "❌ No Java files found" && exit 1)
8988
echo "✅ Java SDK structure validated"
9089
;;
9190
"ruby")
9291
ls *.gemspec > /dev/null 2>&1 || (echo "❌ Missing gemspec file" && exit 1)
93-
test -d lib || (echo "❌ Missing lib directory" && exit 1)
9492
find lib -name "*.rb" | head -1 > /dev/null || (echo "❌ No Ruby files found" && exit 1)
9593
echo "✅ Ruby SDK structure validated"
9694
;;
@@ -116,33 +114,12 @@ jobs:
116114
;;
117115
esac
118116
119-
- name: Validate SDK completeness
120-
run: |
121-
cd ./sdk-output/${{ matrix.language }}
122-
123-
SOURCE_FILES=$(find . -name "*.java" -o -name "*.rb" -o -name "*.py" -o -name "*.js" -o -name "*.cs" -o -name "*.go" | wc -l)
124-
125-
if [ "$SOURCE_FILES" -eq 0 ]; then
126-
echo "❌ FAILED: No source files generated for ${{ matrix.language }}"
127-
exit 1
128-
fi
129-
130-
echo "✅ Validation passed: $SOURCE_FILES source files generated for ${{ matrix.language }}"
131-
132117
- name: Generate validation report
133118
if: always()
134119
run: |
135-
echo "## SDK Generation Report for ${{ matrix.language }}" >> $GITHUB_STEP_SUMMARY
136-
echo "- **Status**: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY
137-
138-
- name: Upload generation artifacts (on failure)
139-
if: failure()
140-
uses: actions/upload-artifact@v3
141-
with:
142-
name: failed-sdk-${{ matrix.language }}
143-
path: ./sdk-output/${{ matrix.language }}
144-
retention-days: 7
145-
120+
echo "## SDK Generation Report for ${{ matrix.language }}"
121+
echo "- **Status**: ${{ job.status }}"
122+
146123
- name: Clean up
147124
if: always()
148125
run: rm -rf ./sdk-output/${{ matrix.language }}
@@ -157,13 +134,13 @@ jobs:
157134
if [[ "${{ needs.validate-sdk-generation.result }}" == "success" ]]; then
158135
echo "✅ SDK Generation Validation: PASSED"
159136
echo "All 6 SDK languages generated successfully from OpenAPI specification"
160-
echo "## ✅ SDK Generation Validation: PASSED" >> $GITHUB_STEP_SUMMARY
161-
echo "All 6 SDK languages (Java, Ruby, Python, JavaScript, C#, Go) generated successfully." >> $GITHUB_STEP_SUMMARY
137+
echo "## ✅ SDK Generation Validation: PASSED"
138+
echo "All 6 SDK languages (Java, Ruby, Python, JavaScript, C#, Go) generated successfully."
162139
else
163140
echo "❌ SDK Generation Validation: FAILED"
164141
echo "One or more SDK generations failed. Check individual language job logs for detailed error messages."
165-
echo "## ❌ SDK Generation Validation: FAILED" >> $GITHUB_STEP_SUMMARY
166-
echo "**One or more SDK languages failed to generate.**" >> $GITHUB_STEP_SUMMARY
167-
echo "Check the individual language job logs above for detailed error messages." >> $GITHUB_STEP_SUMMARY
142+
echo "## ❌ SDK Generation Validation: FAILED"
143+
echo "**One or more SDK languages failed to generate.**"
144+
echo "Check the individual language job logs above for detailed error messages."
168145
exit 1
169146
fi

0 commit comments

Comments
 (0)