-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 1.33 KB
/
ci-build.yaml
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
name: CI Build
on:
push:
branches:
- develop
paths-ignore:
- '**.md'
pull_request:
branches:
- develop
paths-ignore:
- '**.md'
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'zulu'
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build Develop
uses: gradle/gradle-build-action@v2
with:
build-root-directory: ${{ inputs.source }}
cache-read-only: ${{ github.ref != 'refs/heads/main' }} # only update the cache on the default branch https://github.com/gradle/gradle-build-action#optimizing-cache-effectiveness
arguments: |
clean build
--stacktrace
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: '**/build/test-results/**/*.xml'
- name: Publish Test Report
if: always()
uses: actions/upload-artifact@v2
with:
name: test-report
path: '**/build/reports/tests/test/*'
- name: Stop Gradle daemons
run: ./gradlew --stop