feat: add minimal example with SDK generation #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Install dependencies | |
- name: Install dependencies | |
shell: pwsh | |
working-directory: examples/minimal-sdk | |
run: npm ci | |
# Step 6: Generate types & sdk | |
- name: Generate types & sdk | |
shell: pwsh | |
working-directory: examples/minimal-sdk | |
run: npm run generate | |
# Step 7: 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 |