Skip to content

Commit

Permalink
fix(build): fix Community build (#2866)
Browse files Browse the repository at this point in the history
that failed on GH Actions.
Java version is now 17.

and add test reports to the build.
  • Loading branch information
educhastenier authored Feb 15, 2024
1 parent 9fe20dc commit 03b7cc1
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions .github/workflows/build.yml
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'

0 comments on commit 03b7cc1

Please sign in to comment.