-
Notifications
You must be signed in to change notification settings - Fork 30
41 lines (31 loc) · 1.08 KB
/
Copy pathci.yml
File metadata and controls
41 lines (31 loc) · 1.08 KB
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
name: CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v4
with:
# should be kept in sync with [https://github.com/runelite/runelite/blob/master/.github/workflows/CI.yml]
java-version: '11' # runelite currently targets JDK v11
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # v4.4.2
- name: Compile
run: ./gradlew compileJava
- name: Compile Tests
run: ./gradlew compileTestJava
- name: Lint & Formatting
run: ./gradlew checkstyleMain checkstyleTest
- name: Run Tests
run: ./gradlew test
- name: Run Pre-PluginHub-Checks
run: |
longestLine=$(cat build.gradle | wc -L)
if (( longestLine > 120 )); then
echo "Malformed gradle - longest line: ${longestLine}"
exit 1
fi