Skip to content

Commit 6e1e48c

Browse files
chore(go): Update code generation CI to check Go polymorph code (#1936)
1 parent 66a19ab commit 6e1e48c

File tree

71 files changed

+26821
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+26821
-1
lines changed

.github/actions/polymorph_codegen/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ runs:
141141
run: |
142142
make polymorph_dotnet ${{ steps.dependencies.outputs.PROJECT_DEPENDENCIES }}
143143
144+
- name: Regenerate Go code using smithy-dafny
145+
working-directory: ./${{ inputs.library }}
146+
shell: bash
147+
run: |
148+
make polymorph_go
149+
144150
- name: Check regenerated code against commited code
145151
# Composite action inputs seem to not actually support booleans properly for some reason
146152
if: inputs.diff-generated-code == 'true'

.github/workflows/ci_codegen.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
# in this workflow
1919
dotnet-version: ["6.0.x"]
2020
os: [ubuntu-22.04]
21+
go-version: [1.23]
2122
runs-on: ${{ matrix.os }}
2223
defaults:
2324
run:
@@ -48,6 +49,15 @@ jobs:
4849
with:
4950
dotnet-version: ${{ matrix.dotnet-version }}
5051

52+
- name: Install Go
53+
uses: actions/setup-go@v5
54+
with:
55+
go-version: ${{ matrix.go-version }}
56+
57+
- name: Install Go imports
58+
run: |
59+
go install golang.org/x/tools/cmd/goimports@latest
60+
5161
- name: Create temporary global.json
5262
run: echo '{"sdk":{"rollForward":"latestFeature","version":"6.0.0"}}' > ./global.json
5363

DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/WrappedAwsCryptographyDbEncryptionSdkDynamoDbItemEncryptorService/shim.go

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DynamoDbEncryption/runtimes/go/ImplementationFromDafny-go/WrappedAwsCryptographyDbEncryptionSdkDynamoDbService/shim.go

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)