Skip to content

Build

Build #848

Workflow file for this run

name: Build
on:
schedule:
- cron: "15 0 * * *"
push:
branches:
- main
- v3.x
- v4.x
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-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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 -Pcoverage sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=urlaubsverwaltung
-Dsonar.projectKey=urlaubsverwaltung_urlaubsverwaltung
-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=**/__tests__/**,**/*-spec.js,**/*.spec.js,**/*-test.js,**/*.test.js
-Dsonar.eslint.reportPaths=target/js-eslint/report.json
-Dsonar.coverage.exclusions=**/__tests__/**,**/*-spec.js,**/*.spec.js,**/*-test.js,**/*.test.js
-Dsonar.sources=src/main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload video of failed tests
uses: actions/upload-artifact@v4
if: always()
with:
name: failed-ui-tests
path: target/FAILED-*.webm