Skip to content

sonar exclusions optimized #41

sonar exclusions optimized

sonar exclusions optimized #41

Workflow file for this run

name: Check Branch
on:
push:
branches:
- feature/**
- bugfix/**
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Get current branch name
id: get_branch
run: echo "CURRENT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3.1.0
- name: Build
run: CI=true ./gradlew clean assemble
- name: Test
run: CI=true ./gradlew test
- name: Integration Test
run: CI=true ./gradlew integrationTest
- name: Sonar Scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
BRANCH_NAME: ${{ env.CURRENT_BRANCH_NAME }}
run: |
echo "Branch name $BRANCH_NAME"
CI=true ./gradlew sonar --info -Dsonar.branch.name=$BRANCH_NAME