File tree Expand file tree Collapse file tree 2 files changed +107
-0
lines changed Expand file tree Collapse file tree 2 files changed +107
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Shared CI Workflow
2
+
3
+ inputs :
4
+ java_version :
5
+ description : ' The Java version to use.'
6
+ required : true
7
+ java_distribution :
8
+ description : ' The Java distribution to use.'
9
+ required : false
10
+ default : temurin
11
+ os :
12
+ description : ' The OS to use.'
13
+ required : false
14
+ default : ubuntu
15
+ options :
16
+ - ubuntu
17
+ - windows
18
+
19
+ runs :
20
+ using : composite
21
+ steps :
22
+ - name : Setup Java
23
+ uses : actions/setup-java@v4
24
+ with :
25
+ distribution : ${{ inputs.java_distribution }}
26
+ java-version : ${{ inputs.java_version }}
27
+
28
+ - name : Setup DynamoDB Service
29
+ if : inputs.os == 'ubuntu'
30
+ shell : bash
31
+ run : |
32
+ sudo docker run -d -p 8000:8000 amazon/dynamodb-local
33
+
34
+ - name : Setup DynamoDB Service
35
+ if : inputs.os == 'windows'
36
+ shell : pwsh
37
+ run : |
38
+ $ProgressPreference = "SilentlyContinue"
39
+ iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
40
+ mkdir dynamo
41
+ Expand-Archive -Path dynamo.zip -DestinationPath dynamo
42
+ cd dynamo
43
+ javaw -D"java.library.path=./DynamoDBLocal_lib" -jar DynamoDBLocal.jar
44
+
45
+ - name : Restore Dependencies
46
+ shell : bash
47
+ run : ./gradlew dependencies
48
+
49
+ - name : Build Jar
50
+ shell : bash
51
+ id : buildjar
52
+ run : ./gradlew jar
53
+
54
+ - name : Build Documentation
55
+ shell : bash
56
+ run : ./gradlew javadoc
57
+
58
+ - name : Check Style
59
+ shell : bash
60
+ run : ./gradlew checkstyleMain
61
+
62
+ - name : Run Tests
63
+ if : steps.buildjar.outcome == 'success'
64
+ shell : bash
65
+ run : ./gradlew test
Original file line number Diff line number Diff line change
1
+ name : Build and Test
2
+
3
+ on :
4
+ push :
5
+ branches : [main, feat/**, abarker/**]
6
+ paths-ignore :
7
+ - ' **.md' # Do not need to run CI for markdown changes.
8
+ pull_request :
9
+ branches : [main, feat/**]
10
+ paths-ignore :
11
+ - ' **.md'
12
+
13
+ jobs :
14
+ build-test-linux :
15
+ strategy :
16
+ matrix :
17
+ os : [ubuntu-latest]
18
+ javaversion : [8, 11, 17, 19]
19
+ runs-on : ${{ matrix.os }}
20
+ steps :
21
+ - uses : actions/checkout@v3
22
+
23
+ - name : Shared CI Steps
24
+ uses : ./.github/actions/ci
25
+ with :
26
+ os : ubuntu
27
+ java_version : ${{ matrix.javaversion }}
28
+
29
+ build-test-windows :
30
+ strategy :
31
+ matrix :
32
+ os : [windows-latest]
33
+ javaversion : [11, 17]
34
+ runs-on : ${{ matrix.os }}
35
+ steps :
36
+ - uses : actions/checkout@v3
37
+
38
+ - name : Shared CI Steps
39
+ uses : ./.github/actions/ci
40
+ with :
41
+ os : windows
42
+ java_version : ${{ matrix.javaversion }}
You can’t perform that action at this time.
0 commit comments