-
-
Notifications
You must be signed in to change notification settings - Fork 85
41 lines (40 loc) · 1.36 KB
/
test.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
name: Test
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
java: [17, 21]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') && !startsWith(github.ref, 'refs/tags/v') }}
- name: Check Licenses and Generate QMJs
run: ./gradlew checkLicenses generateQmj --stacktrace
- name: Build
run: ./gradlew build publishToMavenLocal --stacktrace -Porg.gradle.parallel.threads=4
- run: mkdir run && echo "eula=true" >> run/eula.txt
- name: Run auto-test server
run: ./gradlew :runAutoAllTestServer --stacktrace
- uses: actions/upload-artifact@v4
with:
name: Production Mods (Java ${{ matrix.java }})
path: |
./**/build/libs/
!./build-logic/**
!./**/build/libs/*-javadoc.jar
!./**/build/libs/*-sources.jar
!./**/build/libs/*-testmod.jar
- uses: actions/upload-artifact@v4
with:
name: Test Mods (Java ${{ matrix.java }})
path: ./**/build/libs/*-testmod.jar