Skip to content

Code changes used for first draft of code generation #190

Code changes used for first draft of code generation

Code changes used for first draft of code generation #190

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/[email protected]
with:
dotnet-version: '7.x.x'
- uses: actions/[email protected]
with:
go-version: '1.21.4'
- name: Install kiota
run: dotnet tool install --global Microsoft.OpenApi.Kiota --version 1.8.1
- name: Clone the existing go-sdk
run: cd ../ && pwd && git clone https://github.com/octokit/go-sdk.git && ls
- name: Download latest schema
run: cd source-generator && pwd && ls && go run schemas/main.go --schema-next=false
- name: Run generation
run: kiota generate -l go --ll trace -o $(pwd)/../go-sdk/github/octokit -n go-sdk -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: cd ../go-sdk && ../source-generator/post-processors/go/post-processor $(pwd)/github/octokit
- name: Build generated and processed SDK
run: |
ls -R
go build ./...