-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.16 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
42
43
44
45
name: Test Generated Mods
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gradle-plugin: ['mdg', 'ng']
minecraft-version: ['1.20.4', '1.20.6', '1.21.1', '1.21.4']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Download npm dependencies
run: npm install
- name: Generate mod template
run: >
npm run run -- generate
--mod-name 'Test Mod'
--mod-id testmod
--minecraft-version ${{ matrix.minecraft-version }}
--gradle-plugin ${{ matrix.gradle-plugin }}
--package-name net.neoforged.testmod
--output-folder out
- name: Make Gradle wrapper executable
working-directory: ./out
run: chmod +x gradlew
- name: Build with Gradle
working-directory: ./out
run: ./gradlew build