Skip to content

sidebar navigation #1952

sidebar navigation

sidebar navigation #1952

Workflow file for this run

name: Build
on:
schedule:
- cron: "2 4 * * *"
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
MAVEN_ARGS: "--no-transfer-progress --errors --fail-at-end --show-version"
jobs:
build:
name: build and analyse
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: 21
cache: 'maven'
- name: Build
run: ./mvnw -Pcoverage dependency:go-offline clean verify
- name: Analyse with SonarCloud
if: ${{ github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }}
run: >
./mvnw $MAVEN_CLI_OPTS
-Pcoverage
sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=urlaubsverwaltung
-Dsonar.projectKey=urlaubsverwaltung_zeiterfassung
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml
-Dsonar.javascript.lcov.reportPaths=target/js-coverage/lcov.info
-Dsonar.javascript.exclusions=**/*.spec.ts,**/*.test.ts,**/*.spec.js,**/*.test.js
-Dsonar.eslint.reportPaths=target/js-eslint/report.json
-Dsonar.coverage.exclusions=**/*.spec.ts,**/*.test.ts,**/*.spec.js,**/*.test.js
-Dsonar.sources=src/main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}