Repository navigation
70 lines (63 loc) · 1.99 KB
/
Copy pathgradle.yml
File metadata and controls
70 lines (63 loc) · 1.99 KB
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
61
62
63
64
65
66
67
68
69
70
name: Java CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: ["8"]
gradle: ["6.0", "6.1", "6.2"]
steps:
- uses: actions/checkout@722adc6
with:
fetch-depth: 0
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@081536e
with:
java-version: ${{ matrix.java }}
- name: Set up Node.js 12
uses: actions/setup-node@8de2f9f
with:
node-version: 12
- uses: actions/cache@cffae95
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: ./gradlew test --no-daemon -Dsnom.test.functional.gradle=${{ matrix.gradle }}
# TODO: Enable release, sonar and artifacts
#- name: Run Semantic Release
# run: |
# echo "gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}" > ~/.gradle/gradle.properties
# echo "gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}" >> ~/.gradle/gradle.properties
# rm -rf build/libs/*.jar
# npm ci
# npm run semantic-release
# if: matrix.gradle == '6.0'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Run SonarQube Scanner
# run: |
# if [ "$SONAR_LOGIN" != "" ]; then
# ./gradlew sonarqube -Dsonar.login=$SONAR_LOGIN --no-daemon
# fi
# if: matrix.gradle == '6.0'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
# TODO: upload artifacts
# - uses: actions/upload-artifact@3446296
# if: always()
# with:
# name: reports
# path: build/reports