From 2462174b19944f5374b8b734ec959f1a6e0c6bcf Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Sat, 26 Oct 2024 17:21:30 -0700 Subject: [PATCH 1/7] NUTCH-3084 Improve CI by filtering and separating plugin and core test executiion --- .github/workflows/master-build.yml | 37 ++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index db24168b9..a785146ca 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -21,7 +21,10 @@ on: pull_request: types: [opened, synchronize, reopened] branches: [master] - +env: + CHECKOUT_VERSION: 'v4.2.2' + PATHS_FILTER_VERSION: 'v3.0.2' + SETUP_JAVA_VERSION: 'v4.5.0' jobs: javadoc: strategy: @@ -30,9 +33,9 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4.1.4 + - uses: actions/checkout@$CHECKOUT_VERSION - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4.2.1 + uses: actions/setup-java@$SETUP_JAVA_VERSION with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -45,9 +48,9 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4.1.4 + - uses: actions/checkout@$CHECKOUT_VERSION - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4.2.1 + uses: actions/setup-java@$SETUP_JAVA_VERSION with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -61,18 +64,32 @@ jobs: - name: Fail if any unknown licenses if: ${{ env.UNKNOWN_LICENSES != '0 Unknown Licenses' }} run: exit 1 - test: + test_core: strategy: matrix: java: ['11'] os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4.1.4 + - uses: actions/checkout@$CHECKOUT_VERSION - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4.2.1 + uses: actions/setup-java@$SETUP_JAVA_VERSION with: java-version: ${{ matrix.java }} distribution: 'temurin' - - name: Test - run: ant clean test -buildfile build.xml + - uses: dorny/paths-filter@$PATHS_FILTER_VERSION + id: filter + with: + filters: | + core: + - 'src/java/**' + plugins: + - 'src/plugins/**' + # run only if 'core' files were changed + - name: core tests + if: steps.filter.outputs.core == 'true' + run: ant clean test-core -buildfile build.xml + # run only if 'plugins' files were changed + - name: plugins tests + if: steps.filter.outputs.plugins == 'true' + run: ant clean test-plugins -buildfile build.xml From 9287fd45185498bac1c622b145daef841e15e906 Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Sat, 26 Oct 2024 17:30:05 -0700 Subject: [PATCH 2/7] NUTCH-3084 Improve CI by filtering and separating plugin and core test executiion --- .github/workflows/master-build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index a785146ca..ccee0b6a9 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -83,13 +83,15 @@ jobs: filters: | core: - 'src/java/**' + - 'src/test/**' + - 'src/testresources/**' plugins: - - 'src/plugins/**' + - 'src/plugin/**' # run only if 'core' files were changed - - name: core tests + - name: test core if: steps.filter.outputs.core == 'true' run: ant clean test-core -buildfile build.xml # run only if 'plugins' files were changed - - name: plugins tests + - name: test plugins if: steps.filter.outputs.plugins == 'true' run: ant clean test-plugins -buildfile build.xml From dcfce16ee272b1045e9eaec04706039693f9f45e Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Sat, 26 Oct 2024 17:33:59 -0700 Subject: [PATCH 3/7] NUTCH-3084 Improve CI by filtering and separating plugin and core test executiion --- .github/workflows/master-build.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index ccee0b6a9..287154b91 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -21,10 +21,6 @@ on: pull_request: types: [opened, synchronize, reopened] branches: [master] -env: - CHECKOUT_VERSION: 'v4.2.2' - PATHS_FILTER_VERSION: 'v3.0.2' - SETUP_JAVA_VERSION: 'v4.5.0' jobs: javadoc: strategy: @@ -33,9 +29,9 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@$CHECKOUT_VERSION + - uses: actions/checkout@v4.2.2 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@$SETUP_JAVA_VERSION + uses: actions/setup-java@$v4.5.0 with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -48,9 +44,9 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@$CHECKOUT_VERSION + - uses: actions/checkout@v4.2.2 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@$SETUP_JAVA_VERSION + uses: actions/setup-java@$v4.5.0 with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -71,13 +67,13 @@ jobs: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@$CHECKOUT_VERSION + - uses: actions/checkout@v4.2.2 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@$SETUP_JAVA_VERSION + uses: actions/setup-java@$v4.5.0 with: java-version: ${{ matrix.java }} distribution: 'temurin' - - uses: dorny/paths-filter@$PATHS_FILTER_VERSION + - uses: dorny/paths-filter@$v3.0.2 id: filter with: filters: | From 8c84022be7802bf5e3c893c53a3792e5b82e4925 Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Sat, 26 Oct 2024 17:36:13 -0700 Subject: [PATCH 4/7] NUTCH-3084 Improve CI by filtering and separating plugin and core test executiion --- .github/workflows/master-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 287154b91..a44eee29d 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -73,7 +73,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: 'temurin' - - uses: dorny/paths-filter@$v3.0.2 + - uses: dorny/paths-filter@$v3.0.0 id: filter with: filters: | From b71e0022d25d34548434847ffd65d47606f9e7be Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Sat, 26 Oct 2024 17:37:43 -0700 Subject: [PATCH 5/7] NUTCH-3084 Improve CI by filtering and separating plugin and core test executiion --- .github/workflows/master-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index a44eee29d..131ffd374 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -73,7 +73,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: 'temurin' - - uses: dorny/paths-filter@$v3.0.0 + - uses: dorny/paths-filter@v3.0.2 id: filter with: filters: | From 89adc699b63d86dde4978c07b5439a4c659a6c21 Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Sat, 26 Oct 2024 17:38:15 -0700 Subject: [PATCH 6/7] NUTCH-3084 Improve CI by filtering and separating plugin and core test executiion --- .github/workflows/master-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 131ffd374..0c163783d 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -73,7 +73,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: 'temurin' - - uses: dorny/paths-filter@v3.0.2 + - uses: dorny/paths-filter@v3.0.0 id: filter with: filters: | From d222f2e55316a0c7267eea8c5f670fd00bf50b7f Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Sat, 26 Oct 2024 17:39:34 -0700 Subject: [PATCH 7/7] NUTCH-3084 Improve CI by filtering and separating plugin and core test executiion --- .github/workflows/master-build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 0c163783d..02176a51d 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -14,7 +14,6 @@ # limitations under the License. name: master pull request ci - on: push: branches: [master] @@ -31,7 +30,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@$v4.5.0 + uses: actions/setup-java@v4.5.0 with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -46,7 +45,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@$v4.5.0 + uses: actions/setup-java@v4.5.0 with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -60,7 +59,7 @@ jobs: - name: Fail if any unknown licenses if: ${{ env.UNKNOWN_LICENSES != '0 Unknown Licenses' }} run: exit 1 - test_core: + tests: strategy: matrix: java: ['11'] @@ -69,7 +68,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@$v4.5.0 + uses: actions/setup-java@v4.5.0 with: java-version: ${{ matrix.java }} distribution: 'temurin'