-
Notifications
You must be signed in to change notification settings - Fork 26
87 lines (70 loc) · 2.46 KB
/
test-and-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
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
# 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 SDK test and build
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: run the unit tests
run: ./gradlew clean build -x javadoc
- 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: 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