Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUTCH-3084 Improve CI by filtering and separating plugin and core test executiion #833

Merged
merged 7 commits into from
Oct 27, 2024
36 changes: 25 additions & 11 deletions .github/workflows/master-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -30,9 +28,9 @@ jobs:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.2.2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v4.5.0
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
Expand All @@ -45,9 +43,9 @@ jobs:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.1.4
- uses: actions/checkout@v4.2.2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v4.5.0
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
Expand All @@ -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/checkout@v4.1.4
- uses: actions/checkout@v4.2.2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4.2.1
uses: actions/setup-java@v4.5.0
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