-
Notifications
You must be signed in to change notification settings - Fork 26
122 lines (103 loc) · 3.52 KB
/
gradle.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
services:
nctl:
image: stormeye2000/cspr-nctl:linux-1.5.2
options: --name cspr-nctl
env:
PREDEFINED_ACCOUNTS: 'true'
MINIMUM_ROUND_EXPONENT: '12'
MAXIMUM_ROUND_EXPONENT: '14'
DEPLOY_DELAY: '30sec'
SPECULATIVE_EXEC_SERVER_ENABLED: 'true'
ports:
- 11101:11101
- 14101:14101
- 18101:18101
- 25101:25101
steps:
- name: Wait for NCTL
run: |
echo "Wait for NCTL"
sleep 30s
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Copy the assets from the NCTL docker image and build
- name: Build and test with Gradle
run: |
cd script && chmod +x docker-copy-assets && ./docker-copy-assets && cd ..
./gradlew clean build
- name: Export project version
run: echo "PROJECT_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}')" >> $GITHUB_ENV
- name: Generate Javadoc
run: ./gradlew javadoc
- name: Deploy tests results to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: true
folder: build/reports/tests
target-folder: docs/latest/junit
- name: Deploy jacoco report to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: true
folder: build/reports/jacoco
target-folder: docs/latest/jacoco
- name: Pull e2e test resources submodule
run: ls -a ./cspr-standard-tests-resources
- name: e2e tests
run: ./script/e2e-test
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: true
folder: build/docs/javadoc
target-folder: docs/latest/javadoc
- name: Deploy tests results to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: true
folder: build/reports/tests
target-folder: docs/${{ env.PROJECT_VERSION }}/junit
- name: Deploy jacoco report to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: true
folder: build/reports/jacoco
target-folder: docs/${{ env.PROJECT_VERSION }}/jacoco
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: true
folder: build/docs/javadoc
target-folder: docs/${{ env.PROJECT_VERSION }}/javadoc
- name: Publish e2e tests
uses: deblockt/[email protected]
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
path: "**/cucumber-report.json"