-
Notifications
You must be signed in to change notification settings - Fork 97
39 lines (37 loc) · 1.01 KB
/
gradle-ci-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Gradle CI Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-22.04
permissions:
security-events: write # for CodeQL
contents: write # for Gradle dependency graph submission
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
dependency-graph: generate-and-submit
cache-disabled: true # play nice with CodeQL
- name: Build with Gradle
run: |
cd $GITHUB_WORKSPACE
./gradlew build jacocoTestReport publishToMavenLocal
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3