Skip to content

Commit 25c929f

Browse files
committed
chore: update ci script for jacoco
1 parent bec8e9e commit 25c929f

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/ci-backend.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ on:
1111
- dev
1212

1313
jobs:
14-
build:
14+
test:
15+
name: Code Quality Check
1516
runs-on: ubuntu-latest
1617

1718
steps:
@@ -26,5 +27,21 @@ jobs:
2627
- name: Grant execute permission for gradlew
2728
run: chmod +x gradlew
2829

29-
- name: Build with Gradle
30-
run: ./gradlew clean build
30+
- name: Cache SonarCloud packages
31+
uses: actions/cache@v3
32+
with:
33+
path: ~/.sonar/cache
34+
key: ${{ runner.os }}-sonar
35+
restore-keys: ${{ runner.os }}-sonar
36+
37+
- name: Setup Gradle
38+
uses: gradle/gradle-build-action@v2
39+
with:
40+
arguments: check
41+
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
42+
43+
- name: Build and analyze
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
47+
run: ./gradlew sonar --info --stacktrace

0 commit comments

Comments
 (0)