Skip to content

Commit 52c212b

Browse files
committed
GitHub Action to verify the Gradle buildSrc.
Signed-off-by: David Venable <dlv@amazon.com>
1 parent c0c9a8a commit 52c212b

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#
2+
# Copyright OpenSearch Contributors
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# The OpenSearch Contributors require contributions made to
6+
# this file be licensed under the Apache-2.0 license or a
7+
# compatible open source license.
8+
#
9+
10+
name: Gradle - Check buildSrc
11+
12+
on:
13+
push:
14+
paths:
15+
- 'buildSrc/**'
16+
- '*gradle*'
17+
pull_request:
18+
paths:
19+
- 'buildSrc/**'
20+
- '*gradle*'
21+
22+
workflow_dispatch:
23+
24+
jobs:
25+
build:
26+
strategy:
27+
matrix:
28+
java: [11, 17, 21]
29+
fail-fast: false
30+
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- name: Set up JDK ${{ matrix.java }}
35+
uses: actions/setup-java@v4
36+
with:
37+
java-version: ${{ matrix.java }}
38+
distribution: temurin
39+
40+
- name: Checkout Data Prepper
41+
uses: actions/checkout@v6
42+
- name: Check Gradle buildSrc
43+
run: ./gradlew -p buildSrc check
44+
- name: Upload Unit Test Results
45+
if: always()
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: data-prepper-test-results-java-${{ matrix.java }}
49+
path: '**/test-results/**/*.xml'
50+
51+
publish-test-results:
52+
name: "Publish Unit Tests Results"
53+
needs: build
54+
runs-on: ubuntu-latest
55+
if: always()
56+
57+
steps:
58+
- name: Download Artifacts
59+
uses: actions/download-artifact@v4
60+
with:
61+
path: test-results
62+
63+
- name: Publish Unit Test Results
64+
uses: EnricoMi/publish-unit-test-result-action@v1
65+
with:
66+
files: "test-results/**/*.xml"

0 commit comments

Comments
 (0)