forked from boozallen/jenkins-templating-engine
-
Notifications
You must be signed in to change notification settings - Fork 58
84 lines (84 loc) · 2.27 KB
/
CI.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
name: CI
on:
pull_request:
branches:
- main
jobs:
Spotless:
runs-on: ubuntu-latest
if: github.repository == 'jenkinsci/templating-engine-plugin'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: eskatos/gradle-command-action@v1
with:
arguments: --no-daemon spotlessCheck
CodeNarc:
runs-on: ubuntu-latest
if: github.repository == 'jenkinsci/templating-engine-plugin'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: eskatos/gradle-command-action@v1
with:
arguments: --no-daemon codenarc
- uses: actions/upload-artifact@v4
if: failure()
with:
name: codenarc-results
path: build/reports
MarkdownLint:
runs-on: ubuntu-latest
if: github.repository == 'jenkinsci/templating-engine-plugin'
container:
image: davidanson/markdownlint-cli2:0.4.0
options: --user root
steps:
- uses: actions/checkout@v2
- name: markdownlint-cli2
run: markdownlint-cli2
Vale:
runs-on: ubuntu-latest
if: github.repository == 'jenkinsci/templating-engine-plugin'
container:
image: jdkato/vale:v2.18.0
options: --user root
steps:
- uses: actions/checkout@v2
- name: vale
run: vale docs
Unit_Test:
runs-on: ubuntu-latest
if: github.repository == 'jenkinsci/templating-engine-plugin'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: eskatos/gradle-command-action@v1
with:
arguments: --no-daemon test jacocoTestReport
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results
path: build/reports
Build_JPI:
runs-on: ubuntu-latest
if: github.repository == 'jenkinsci/templating-engine-plugin'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: eskatos/gradle-command-action@v1
with:
arguments: --no-daemon jpi
- uses: actions/upload-artifact@v4
with:
name: jpi
path: build/libs/templating-engine.hpi