This is an automated email from the ASF dual-hosted git repository.
lewismc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git
The following commit(s) were added to refs/heads/master by this push:
new 5961e26fb NUTCH-3084 Improve CI by filtering and separating plugin and
core test execution (#833)
5961e26fb is described below
commit 5961e26fb999c503e38507fc7cf1cdbc034acfb7
Author: Lewis John McGibbney <[email protected]>
AuthorDate: Sun Oct 27 09:42:46 2024 -0700
NUTCH-3084 Improve CI by filtering and separating plugin and core test
execution (#833)
* NUTCH-3084 Improve CI by filtering and separating plugin and core test
execution
---
.github/workflows/master-build.yml | 36 +++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/master-build.yml
b/.github/workflows/master-build.yml
index db24168b9..02176a51d 100644
--- a/.github/workflows/master-build.yml
+++ b/.github/workflows/master-build.yml
@@ -14,14 +14,12 @@
# limitations under the License.
name: master pull request ci
-
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened]
branches: [master]
-
jobs:
javadoc:
strategy:
@@ -30,9 +28,9 @@ jobs:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/[email protected]
+ - uses: actions/[email protected]
- name: Set up JDK ${{ matrix.java }}
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
@@ -45,9 +43,9 @@ jobs:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/[email protected]
+ - uses: actions/[email protected]
- name: Set up JDK ${{ matrix.java }}
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
@@ -61,18 +59,34 @@ jobs:
- name: Fail if any unknown licenses
if: ${{ env.UNKNOWN_LICENSES != '0 Unknown Licenses' }}
run: exit 1
- test:
+ tests:
strategy:
matrix:
java: ['11']
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/[email protected]
+ - uses: actions/[email protected]
- name: Set up JDK ${{ matrix.java }}
- uses: actions/[email protected]
+ uses: actions/[email protected]
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- - name: Test
- run: ant clean test -buildfile build.xml
+ - uses: dorny/[email protected]
+ id: filter
+ with:
+ filters: |
+ core:
+ - 'src/java/**'
+ - 'src/test/**'
+ - 'src/testresources/**'
+ plugins:
+ - 'src/plugin/**'
+ # run only if 'core' files were changed
+ - 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: test plugins
+ if: steps.filter.outputs.plugins == 'true'
+ run: ant clean test-plugins -buildfile build.xml