Build #462
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: Build | |
on: | |
schedule: | |
- cron: "15 0 * * *" | |
push: | |
branches: | |
- main | |
- v3.x | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: build and analyse | |
runs-on: ubuntu-20.04 | |
env: | |
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: 'maven' | |
- name: Cache npm dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Build | |
run: > | |
./mvnw $MAVEN_CLI_OPTS | |
-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_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@v3 | |
if: hashFiles('target/FAILED-*.flv') != '' | |
with: | |
name: failed-selenium-tests | |
path: target/FAILED-*.flv |