-
Notifications
You must be signed in to change notification settings - Fork 4
106 lines (92 loc) · 3.04 KB
/
on-push.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: PRs and merges to master
env:
ZINC_VERSION: "v0.1.5-ING-13"
on:
push:
branches: [ master, main ]
paths-ignore:
- 'docs/**'
- '*.md'
- 'LICENSE'
- 'TRADEMARK'
- 'CONTRIBUTORS'
- '.ci/**'
- '.gitignore'
pull_request:
branches: [ master, main ]
paths-ignore:
- 'docs/**'
- '*.md'
- 'LICENSE'
- 'TRADEMARK'
- 'CONTRIBUTORS'
- '.ci/**'
- '.gitignore'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8.0.232
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 8.0.232
java-package: jdk
# Build cache
- name: Cache Gradle Cache
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}-${{ hashFiles('**/gradle.properties') }}
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache gradle wrapper
uses: actions/cache@v3
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Fetch Zinc ING Fork
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "mvdbos/zinc"
version: "tags/${{ env.ZINC_VERSION }}"
file: "zinc-linux.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Zinc ING Fork and add to $PATH
run: |
tar xvzf zinc-linux.tar.gz
echo "$GITHUB_WORKSPACE/zinc-linux/" >> $GITHUB_PATH
- name: Build with Gradle
run: ./gradlew clean cleanTest check test testReport jacocoRootReport checkLicense spotBugsMain --no-build-cache --rerun-tasks --no-daemon --no-parallel --stacktrace --info
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sample ZKDapp - Build with Gradle
run: ./gradlew clean cleanTest build --no-build-cache --rerun-tasks --no-daemon --no-parallel --stacktrace --info
working-directory: sample-zkdapp
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload JUnit test report
if: always()
uses: actions/upload-artifact@v3
with:
name: Junit Test Report
path: build/reports/tests/test
- name: Upload JaCoCo report
if: always()
uses: actions/upload-artifact@v3
with:
name: JaCoCo Report
path: build/reports/jacoco/aggregate/html
- name: Upload detekt report
if: always()
uses: actions/upload-artifact@v3
with:
name: Detekt Report
path: build/reports/detekt