-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): fix Community build (#2866)
that failed on GH Actions. Java version is now 17. and add test reports to the build.
- Loading branch information
1 parent
9fe20dc
commit 03b7cc1
Showing
1 changed file
with
25 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 |
---|---|---|
@@ -1,38 +1,39 @@ | ||
name: Build | ||
name: Build Bonita Community | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- dev | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build: | ||
name: Build | ||
name: Build Bonita Community | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 11 | ||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v1 | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- name: 🔧 Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
- name: Cache Gradle packages | ||
uses: actions/cache@v1 | ||
cache-read-only: false | ||
|
||
- name: ⚙️ Run Community build & ✔️ unit tests | ||
run: ./gradlew build | ||
|
||
- name: Run Integration tests | ||
run: ./gradlew iT | ||
|
||
- name: 🚀 Publish Test Report | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
if: always() | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | ||
restore-keys: ${{ runner.os }}-gradle | ||
- name: Build and test | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
# run: ./gradlew build sonarqube -Dsonar.scanner.force-deprecated-java-version=true | ||
run: ./gradlew build iT | ||
files: '**/build/test-results/**/*.xml' |