Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(GH actions): add test report #282

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Loading