Skip to content

Commit 0bf4892

Browse files
ci: Add CodeQL workflow with Java 25 setup for java-kotlin analysis
Agent-Logs-Url: https://github.com/marcosbarbero/scim2-sdk-jvm/sessions/812bb1b2-f666-4b12-a96e-f170fede0a0e Co-authored-by: marcosbarbero <9323996+marcosbarbero@users.noreply.github.com>
1 parent e4421d1 commit 0bf4892

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
# Run every Monday at 06:00 UTC
10+
- cron: '0 6 * * 1'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
analyze:
17+
name: Analyze (${{ matrix.language }})
18+
runs-on: ubuntu-latest
19+
timeout-minutes: 30
20+
permissions:
21+
security-events: write
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- language: java-kotlin
27+
build-mode: manual
28+
- language: actions
29+
build-mode: none
30+
- language: javascript-typescript
31+
build-mode: none
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v6
35+
36+
- name: Set up JDK 25
37+
if: matrix.language == 'java-kotlin'
38+
uses: actions/setup-java@v5
39+
with:
40+
distribution: temurin
41+
java-version: 25
42+
43+
- name: Cache Maven dependencies
44+
if: matrix.language == 'java-kotlin'
45+
uses: actions/cache@v5
46+
with:
47+
path: ~/.m2/repository
48+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
49+
restore-keys: ${{ runner.os }}-maven-
50+
51+
- name: Initialize CodeQL
52+
uses: github/codeql-action/init@v4
53+
with:
54+
languages: ${{ matrix.language }}
55+
build-mode: ${{ matrix.build-mode }}
56+
57+
- name: Build Java/Kotlin
58+
if: matrix.language == 'java-kotlin'
59+
run: mvn test-compile -B -q -DskipTests
60+
61+
- name: Perform CodeQL Analysis
62+
uses: github/codeql-action/analyze@v4
63+
with:
64+
category: "/language:${{ matrix.language }}"

0 commit comments

Comments
 (0)