-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,22 +14,27 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4.0.0 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/[email protected] | ||
|
||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@v2.10.0 | ||
uses: gradle/gradle-build-action@v2.11.1 | ||
with: | ||
arguments: build | ||
|
||
- name: Get build artifact ready | ||
run: mkdir staging && cp build/libs/*.jar staging | ||
|
||
- name: Upload a Build Artifact | ||
uses: actions/upload-artifact@v3.1.3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dev-build | ||
path: staging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,39 @@ | ||
name: Sonarcloud | ||
name: SonarCloud | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- main | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build: | ||
name: Build | ||
name: Build and analyze | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4.0.0 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
distribution: 'temurin' | ||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: ./gradlew build sonarqube --info | ||
run: ./gradlew build sonar --info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters