Skip to content

Generate Go SDK

Generate Go SDK #69

Workflow file for this run

name: "Build and validate Go generated SDK"
on:
pull_request:
workflow_dispatch:
schedule:
# Run generation nightly on latest OpenAPI spec
- cron: '0 0 * * *'
jobs:
build:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: '7.x.x'
- uses: actions/setup-go@v3.5.0
with:
go-version: '1.20.4'
- name: Install kiota
run: dotnet tool install --global Microsoft.OpenApi.Kiota --version 1.2.0
- name: Download latest schema
run: go run schemas/main.go --schema-next=false
- name: Run generation
run: time kiota generate -l go --ll trace -o generated/go -n kiota -d schemas/downloaded.json
- name: Build post-processing
run: go build -o post-processors/go/post-processor post-processors/go/main.go
- name: Run post-processing
run: post-processors/go/post-processor $(pwd)/generated/go
- name: Build generated and processed SDK
run: |
cd generated/go
go build ./...