Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/actions/maven-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,27 @@ description: >
Builds and installs the whole Maven reactor to the local repo, skipping the
maven-plugin's invoker-plugin integration tests. Those run serially afterwards
via build-and-test-plugins.
inputs:
skip-tests:
description: >
Set to 'true' to skip executing unit/integration tests (surefire)
during the install. Intended for the CodeQL build, which only needs the
compiled classes for analysis.
required: false
default: 'false'
runs:
using: "composite"
steps:
- name: Maven install
shell: bash
env:
SKIP_TESTS: ${{ inputs.skip-tests }}
run: |
./mvnw --no-transfer-progress -B -T 1C -Dinvoker.skip=true install --file pom.xml
SKIP_TEST_FLAG=""
if [ "$SKIP_TESTS" = "true" ]; then
SKIP_TEST_FLAG="-DskipTests"
fi
# -Daether.syncContext.named.time raises the local-repo lock timeout so
# parallel (-T 1C) modules forking test JVMs do not deadlock on shared
# reactor artifacts (see CodeQL-Build lock-timeout failures).
./mvnw --no-transfer-progress -B -T 1C -Dinvoker.skip=true -Daether.syncContext.named.time=3000 $SKIP_TEST_FLAG install --file pom.xml
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ jobs:
uses: actions/checkout@v7
with:
fetch-depth: 2
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Set up Java
uses: actions/setup-java@v5
with:
Expand All @@ -38,9 +35,12 @@ jobs:
languages: java

- name: Build with Maven
# CodeQL only needs the source built for analysis; the maven-plugin's invoker
# ITs already run in the main Build workflow (see maven-install action).
# CodeQL only needs the source built for analysis, so tests are skipped.
# The maven-plugin's invoker ITs already run in the main Build workflow
# (see the maven-install action used by build-and-test-plugins).
uses: ./.github/actions/maven-install
with:
skip-tests: 'true'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
Loading