This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/main by this push:
     new 447ae1b23 build(ci): build a reduced matrix on pull requests (#2011)
447ae1b23 is described below

commit 447ae1b2383f644a6cbb3bcd1f6260f54528e59b
Author: Lukasz Lenart <[email protected]>
AuthorDate: Thu Oct 15 07:23:11 2026 +0200

    build(ci): build a reduced matrix on pull requests (#2011)
    
    Every push to a pull request queued 8 jobs on the shared ASF runner
    pool. Pull requests now build JDK 17 (the required check) and JDK 25
    with Jakarta EE 11, covering the oldest JDK and the newest stack;
    pushes to the long-lived branches still build the full matrix.
    
    OWASP runs on a pull request only when it changes a pom.xml, the
    suppression file or the workflow itself. It is not a required check,
    so the path filter cannot leave a pull request waiting on it.
    
    A pull request push now queues 4 jobs instead of 8.
    
    Co-authored-by: Claude Opus 5.5 <[email protected]>
---
 .github/workflows/maven.yml | 14 ++++++--------
 .github/workflows/owasp.yml |  5 +++++
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index b00c01cfa..2b9840adf 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -55,17 +55,15 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        include:
+        java: [ '17', '21', '25' ]
+        profile: [ '', '-Pjakartaee11' ]
+        exclude:
           - java: '17'
-            profile: ''
-          - java: '21'
-            profile: ''
-          - java: '21'
             profile: '-Pjakartaee11'
-          - java: '25'
+          # Pull requests build the oldest JDK and the newest on Jakarta EE 
11; pushes build everything.
+          - java: ${{ github.event_name == 'pull_request' && '21' || 'none' }}
+          - java: ${{ github.event_name == 'pull_request' && '25' || 'none' }}
             profile: ''
-          - java: '25'
-            profile: '-Pjakartaee11'
     steps:
       - name: Checkout code
         uses: actions/checkout@v7
diff --git a/.github/workflows/owasp.yml b/.github/workflows/owasp.yml
index 34c981bc5..fafe64e11 100644
--- a/.github/workflows/owasp.yml
+++ b/.github/workflows/owasp.yml
@@ -16,7 +16,12 @@
 name: OWASP checkup
 
 on:
+  # Not a required check, so path filtering cannot leave a pull request 
blocked.
   pull_request:
+    paths:
+      - '**/pom.xml'
+      - 'src/etc/project-suppression.xml'
+      - '.github/workflows/owasp.yml'
   push:
     branches:
       - 'main'

Reply via email to