Skip to content

Commit 7808047

Browse files
Create main.yml
1 parent 91e6fba commit 7808047

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: my-actions
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: 21
19+
distribution: 'temurin'
20+
21+
- name: Make gradlew executable
22+
run: chmod +x gradlew
23+
24+
- name: Cache SonarQube packages
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.sonar/cache
28+
key: ${{ runner.os }}-sonar
29+
restore-keys: ${{ runner.os }}-sonar
30+
31+
- name: Cache Gradle packages
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.gradle/caches
35+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
36+
restore-keys: ${{ runner.os }}-gradle
37+
38+
- name: Run tests and generate Jacoco report
39+
run: ./gradlew test jacocoTestReport --no-daemon

0 commit comments

Comments
 (0)