Skip to content

chore(go): Update code generation CI to check Go polymorph code #1936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actions/polymorph_codegen/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ runs:
run: |
make polymorph_dotnet ${{ steps.dependencies.outputs.PROJECT_DEPENDENCIES }}

- name: Regenerate Go code using smithy-dafny
working-directory: ./${{ inputs.library }}
shell: bash
run: |
make polymorph_go

- name: Check regenerated code against commited code
# Composite action inputs seem to not actually support booleans properly for some reason
if: inputs.diff-generated-code == 'true'
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ci_codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
# in this workflow
dotnet-version: ["6.0.x"]
os: [ubuntu-22.04]
go-version: [1.23]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down Expand Up @@ -48,6 +49,15 @@ jobs:
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Install Go imports
run: |
go install golang.org/x/tools/cmd/goimports@latest

- name: Create temporary global.json
run: echo '{"sdk":{"rollForward":"latestFeature","version":"6.0.0"}}' > ./global.json

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading