Skip to content

Commit cee4700

Browse files
committed
Move validation steps in separate jobs
Signed-off-by: Peter Nied <petern@amazon.com>
1 parent 49016cd commit cee4700

File tree

2 files changed

+35
-33
lines changed

2 files changed

+35
-33
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
runs-on: ${{ matrix.platform }}
1717

1818
steps:
19-
2019
- name: Set up JDK for build and test
2120
uses: actions/setup-java@v2
2221
with:
@@ -26,25 +25,13 @@ jobs:
2625
- name: Checkout security
2726
uses: actions/checkout@v2
2827

29-
- name: Cache Gradle packages
30-
uses: actions/cache@v2
31-
with:
32-
path: |
33-
~/.gradle/caches
34-
~/.gradle/wrapper
35-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
36-
restore-keys: |
37-
${{ runner.os }}-gradle-
38-
39-
- name: Package
40-
uses: gradle/gradle-build-action@v2
41-
with:
42-
arguments: clean build -Dbuild.snapshot=false -x test -x integrationTest
43-
44-
- name: Test
28+
- name: Clean Build and Test
4529
uses: gradle/gradle-build-action@v2
4630
with:
47-
arguments: test integrationTest
31+
arguments: clean build -Dbuild.snapshot=false
32+
arguments: -x spotlessCheck # Don't check for style issues, enforced in Code Hygiene workflow
33+
arguments: -x checkstyleMain # Don't check for style issues, enforced in Code Hygiene workflow
34+
arguments: -x checkstyleTest # Don't check for style issues, enforced in Code Hygiene workflow
4835

4936
- name: Coverage
5037
uses: codecov/codecov-action@v1
@@ -63,6 +50,33 @@ jobs:
6350
if: always()
6451
run: echo "Check the artifact ${{ matrix.platform }}-JDK${{ matrix.jdk }}-reports for detailed test results"
6552

53+
integration-tests:
54+
name: build
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
jdk: [17]
59+
platform: ["ubuntu-latest", "windows-latest", "macos-latest"]
60+
runs-on: ${{ matrix.platform }}
61+
62+
steps:
63+
- name: Set up JDK for build and test
64+
uses: actions/setup-java@v2
65+
with:
66+
distribution: temurin # Temurin is a distribution of adoptium
67+
java-version: ${{ matrix.jdk }}
68+
69+
- name: Checkout security
70+
uses: actions/checkout@v2
71+
72+
- name: Clean build and Test
73+
uses: gradle/gradle-build-action@v2
74+
with:
75+
arguments: clean integrationTest -Dbuild.snapshot=false
76+
arguments: -x spotlessCheck # Don't check for style issues, enforced in Code Hygiene workflow
77+
arguments: -x checkstyleMain # Don't check for style issues, enforced in Code Hygiene workflow
78+
arguments: -x checkstyleTest # Don't check for style issues, enforced in Code Hygiene workflow
79+
6680
backward-compatibility:
6781
runs-on: ubuntu-latest
6882
steps:

build.gradle

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ test {
120120
}
121121
retry {
122122
failOnPassedAfterRetry = false
123-
// maxRetries = 5
123+
maxRetries = 5
124124
}
125125
jacoco {
126126
excludes = [
@@ -278,20 +278,14 @@ sourceSets {
278278
}
279279
}
280280

281-
//add new task that runs integration tests
281+
//add new task that runs integration tests, only runs when explictly called
282282
task integrationTest(type: Test) {
283283
description = 'Run integration tests.'
284284
group = 'verification'
285285
systemProperty "java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager"
286286
testClassesDirs = sourceSets.integrationTest.output.classesDirs
287287
classpath = sourceSets.integrationTest.runtimeClasspath
288-
retry {
289-
failOnPassedAfterRetry = false
290-
maxRetries = 2
291-
maxFailures = 10
292-
}
293-
//run the integrationTest task after the test task
294-
shouldRunAfter test
288+
295289
}
296290

297291
//run the integrationTest task before the check task
@@ -376,12 +370,6 @@ dependencies {
376370
runtimeOnly 'org.apache.santuario:xmlsec:2.2.3'
377371
runtimeOnly 'com.github.luben:zstd-jni:1.5.0-2'
378372
runtimeOnly 'org.checkerframework:checker-qual:3.5.0'
379-
// testRuntimeOnly 'io.netty:netty-tcnative:2.0.54.Final:windows-x86_64'
380-
// runtimeOnly 'io.netty:netty-tcnative-boringssl-static:2.0.54.Final'
381-
// testRuntimeOnly "io.netty:netty-all:${versions.netty}"
382-
testRuntimeOnly 'io.netty:netty-tcnative-boringssl-static:2.0.54.Final:windows-x86_64'
383-
384-
385373

386374
implementation 'org.apache.commons:commons-lang3:3.4'
387375
testImplementation "org.opensearch:common-utils:${common_utils_version}"

0 commit comments

Comments
 (0)