From feaf8ddc051cc9a8fccb4f8cc8e78a5705bf38cb Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Mon, 18 Apr 2022 15:52:53 +0200 Subject: [PATCH] Reduce Maven console output for CodeQL analysis; cache Maven repo (#2105) --- .github/workflows/codeql-analysis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 02ecaddc3d..b6b7cc3c89 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -35,12 +35,20 @@ jobs: # Run all security queries and maintainability and reliability queries queries: +security-and-quality + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + # Only compile main sources, but ignore test sources because findings for them might not # be that relevant (though GitHub security view also allows filtering by source type) # Can replace this with github/codeql-action/autobuild action to run complete build - name: Compile sources run: | - mvn compile + mvn compile --batch-mode - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1