forked from urlaubsverwaltung/urlaubsverwaltung
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 1.9 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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