Release version 1.1.1 #8
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
name: Analyze main | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
name: Save sonar statistics | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch branches | |
run: git fetch --all | |
- name: Set up JDK 21 for x64 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
architecture: x64 | |
- name: Cache Maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven | |
- name: Execute unit tests | |
run: mvn test checkstyle:check | |
- name: Execute sonar scan | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn sonar:sonar -Dsonar.token=$SONAR_TOKEN -Dsonar.branch.name=${{ github.head_ref }} |