This repository has been archived by the owner on Apr 8, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 450
121 lines (107 loc) · 3.31 KB
/
pr.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
name: OpenOSRS - CI (PR)
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
jobs:
pr-lint:
name: PR title
runs-on: ubuntu-latest
steps:
- name: PR title lint
if: github.event_name == 'pull_request'
uses: MorrisonCole/[email protected]
with:
title-regex: '^([\w-/]+): \w+'
on-failed-regex-fail-action: false
on-failed-regex-request-changes: false
on-failed-regex-create-review: true
on-failed-regex-comment: "Your PR title should match the following regex: `%regex%`!"
repo-token: ${{ secrets.GITHUB_TOKEN }}
validate:
name: Validate gradle wrapper
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: gradle/[email protected]
build:
name: Build
needs: [pr-lint, validate]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: 11
cache: 'gradle'
- name: Assembling
run: ./gradlew assemble --console=plain
- name: Building
run: ./gradlew build --stacktrace -x test -x checkstyleMain -x checkstyleTest --console=plain
test:
name: Test
needs: [pr-lint, validate]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: 11
cache: 'gradle'
- name: Assembling
run: ./gradlew assemble --console=plain
- name: Testing
run: ./gradlew test -x deobfuscator:test --stacktrace --console=plain
checkstyleMain:
name: Checkstyle main
needs: [pr-lint, validate]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: 11
cache: 'gradle'
- name: Assembling
run: ./gradlew assemble --console=plain
- name: Checking code conventions
run: ./gradlew checkstyleMain --console=plain
checkstyleTest:
name: Checkstyle test
needs: [pr-lint, validate]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Set up JDK 11
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: 11
cache: 'gradle'
- name: Assembling
run: ./gradlew assemble --console=plain
- name: Checking code conventions
run: ./gradlew checkstyleTest --console=plain
approve:
name: Approve
needs: [build, test, checkstyleMain, checkstyleTest]
runs-on: ubuntu-latest
steps:
- name: Approve pull request
if: github.event_name == 'pull_request' && github.actor == 'OpenOSRS'
uses: hmarr/[email protected]
with:
github-token: ${{ secrets.Owain }}