Skip to content

feat: add minimal example with SDK generation #3

feat: add minimal example with SDK generation

feat: add minimal example with SDK generation #3

Workflow file for this run

name: Validate Example generation
on: push
jobs:
generate_sdk:
runs-on: windows-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Setup Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22" # Specify the version of Node.js you want to use
# Step 3: Run PowerShell commands
- name: Run PowerShell Script
shell: pwsh
run: |
Write-Host "Running a PowerShell script on Windows"
node --version
npm --version
# Step 4: Install dependencies
- name: Install dependencies
shell: pwsh
run: npm ci
# Step 5: Go to the example directory
- name: Go to the example directory
shell: pwsh
run: cd examples/minimal-sdk
# Step 6: Install dependencies
- name: Install dependencies
shell: pwsh
run: npm ci
# Step 7: Generate types & sdk
- name: Generate types & sdk
shell: pwsh
run: npm run generate
# Step 8: Expect no changes in git
- name: Expect no changes
shell: bash
run: |
if git diff --exit-code --compact-summary; then
echo "No changes detected"
else
echo "ERROR: Changes detected. The command executed by the pipeline resulted in changes that should have been made locally before creating a commit."
exit 1
fi