Skip to content

Commit dcc3dd9

Browse files
fix #90
1 parent a386c82 commit dcc3dd9

File tree

2 files changed

+45
-46
lines changed

2 files changed

+45
-46
lines changed

.github/workflows/ci.yml

Lines changed: 45 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,51 @@ name: ci
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [ "main" ]
76
pull_request:
8-
branches:
9-
- main
107

118
jobs:
12-
detekt:
13-
uses: ./.github/workflows/gradle-build.yml
14-
with:
15-
gradle-task: clean detekt -x test
16-
17-
test:
18-
uses: ./.github/workflows/gradle-build.yml
19-
with:
20-
gradle-task: clean test -x detekt
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Validate Gradle Wrapper
19+
uses: gradle/wrapper-validation-action@v2
20+
21+
- name: Setup Java
22+
uses: actions/setup-java@v4
23+
with:
24+
distribution: liberica
25+
java-version: "21"
26+
27+
- name: Setup Gradle with Cache
28+
uses: gradle/actions/setup-gradle@v4
29+
with:
30+
cache-read-only: ${{ github.event_name == 'pull_request' }}
31+
32+
- name: Detekt + Build
33+
run: ./gradlew clean detekt build --stacktrace
34+
35+
- name: Upload Detekt reports
36+
if: always()
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: detekt-reports
40+
path: |
41+
**/build/reports/detekt/*
42+
if-no-files-found: ignore
43+
44+
- name: Upload Test reports
45+
if: always()
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: test-reports
49+
path: |
50+
**/build/reports/tests/test/*
51+
**/build/test-results/test/*
52+
if-no-files-found: ignore

.github/workflows/gradle-build.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)