Skip to content

Commit 7823469

Browse files
init CI
1 parent 9a4039f commit 7823469

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

.github/workflows/ci_test_go.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# This workflow performs tests in Go.
2+
name: Library Go tests
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
dafny:
8+
description: "The Dafny version to run"
9+
required: true
10+
type: string
11+
regenerate-code:
12+
description: "Regenerate code using smithy-dafny"
13+
required: false
14+
default: false
15+
type: boolean
16+
mpl-version:
17+
description: "MPL version to use"
18+
required: false
19+
type: string
20+
mpl-head:
21+
description: "Running on MPL HEAD"
22+
required: false
23+
default: false
24+
type: boolean
25+
26+
jobs:
27+
testGo:
28+
strategy:
29+
matrix:
30+
library: [DynamoDbEncryption]
31+
os: [macos-13]
32+
go-version: ["1.23"]
33+
runs-on: ${{ matrix.os }}
34+
permissions:
35+
id-token: write
36+
contents: read
37+
steps:
38+
- name: Configure AWS Credentials
39+
uses: aws-actions/configure-aws-credentials@v4
40+
with:
41+
aws-region: us-west-2
42+
role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-DDBEC-Dafny-Role-us-west-2
43+
role-session-name: DDBEC-Dafny-Java-Tests
44+
45+
- uses: actions/checkout@v3
46+
with:
47+
submodules: recursive
48+
49+
- name: Setup Dafny
50+
uses: dafny-lang/[email protected]
51+
with:
52+
dafny-version: ${{ inputs.dafny }}
53+
54+
- name: Update MPL submodule if using MPL HEAD
55+
if: ${{ inputs.mpl-head == true }}
56+
working-directory: submodules/MaterialProviders
57+
run: |
58+
git checkout main
59+
git pull
60+
git submodule update --init --recursive
61+
git rev-parse HEAD
62+
63+
- name: Update project.properties if using MPL HEAD
64+
if: ${{ inputs.mpl-head == true }}
65+
run: |
66+
sed "s/mplDependencyJavaVersion=.*/mplDependencyJavaVersion=${{inputs.mpl-version}}/g" project.properties > project.properties2; mv project.properties2 project.properties
67+
68+
# - name: Regenerate code using smithy-dafny if necessary
69+
# if: ${{ inputs.regenerate-code }}
70+
# uses: ./.github/actions/polymorph_codegen
71+
# with:
72+
# dafny: ${{ env.DAFNY_VERSION }}
73+
# library: ${{ matrix.library }}
74+
# diff-generated-code: false
75+
# update-and-regenerate-mpl: true
76+
77+
- name: Install Go
78+
uses: actions/setup-go@v5
79+
with:
80+
go-version: ${{ matrix.go-version }}
81+
82+
- name: Install Go imports
83+
run: |
84+
go install golang.org/x/tools/cmd/goimports@latest

.github/workflows/push.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
push:
66
branches:
77
- main
8+
- Golang/dev
89

910
jobs:
1011
getVersion:
@@ -56,6 +57,11 @@ jobs:
5657
uses: ./.github/workflows/library_rust_tests.yml
5758
with:
5859
dafny: ${{needs.getVersion.outputs.version}}
60+
pr-ci-go:
61+
needs: getVersion
62+
uses: ./.github/workflows/ci_test_go.yml
63+
with:
64+
dafny: ${{needs.getVersion.outputs.version}}
5965
pr-ci-net-test-vectors:
6066
needs: getVersion
6167
uses: ./.github/workflows/ci_test_vector_net.yml

0 commit comments

Comments
 (0)