File tree Expand file tree Collapse file tree 2 files changed +90
-0
lines changed Expand file tree Collapse file tree 2 files changed +90
-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
+ run : |
37
+ $ProgressPreference = "SilentlyContinue"
38
+ iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
39
+ mkdir dynamo
40
+ Expand-Archive -Path dynamo.zip -DestinationPath dynamo
41
+ cd dynamo
42
+ javaw -D"java.library.path=./DynamoDBLocal_lib" -jar DynamoDBLocal.jar
43
+
44
+ - name : Restore Dependencies
45
+ shell : bash
46
+ run : ./gradlew dependencies
47
+
48
+ - name : Build Jar
49
+ shell : bash
50
+ id : buildjar
51
+ run : ./gradlew jar
52
+
53
+ - name : Build Documentation
54
+ shell : bash
55
+ run : ./gradlew javadoc
56
+
57
+ - name : Check Style
58
+ shell : bash
59
+ run : ./gradlew checkstyleMain
60
+
61
+ - name : Run Tests
62
+ if : steps.buildjar.outcome == 'success'
63
+ shell : bash
64
+ 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-and-test :
15
+ strategy :
16
+ matrix :
17
+ javaversion : [8, 11, 17, 19]
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+
22
+ - name : Shared CI Steps
23
+ uses : ./.github/actions/ci
24
+ with :
25
+ os : ubuntu
26
+ java_version : ${{ matrix.javaversion }}
You can’t perform that action at this time.
0 commit comments