-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (116 loc) · 4.59 KB
/
Copy pathgametests.yml
File metadata and controls
118 lines (116 loc) · 4.59 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
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
name: "CI"
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
env:
- server
- client
modpack:
- cyclops-all
- cyclops-all-deps
- cyclops-id
mc:
- 1.21.1
- 26.1.2
- 26.2
loader:
- neoforge
- forge
- fabric
include:
- mc: 1.21.1
mc-server-test-file: none # All loaders are finicky with gametests in 1.21 production, so don't run them.
- mc: 1.21.1
loader: fabric
fabric-api: 0.116.7 # https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/all?page=1&pageSize=20&showAlphaFiles=show
fabric-gametest-api: 2.0.9+50ed0faf7a # https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-gametest-api-v1/
- mc: 26.1.2
loader: fabric
fabric-api: 0.146.1 # https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/all?page=1&pageSize=20&showAlphaFiles=show
fabric-gametest-api: 4.0.13+00a1fba64c # https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-gametest-api-v1/
- mc: 26.2
loader: fabric
fabric-api: 0.153.0 # https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/all?page=1&pageSize=20&showAlphaFiles=show
fabric-gametest-api: 4.0.19+4a7fa081f7 # https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-gametest-api-v1/
exclude:
- modpack: cyclops-id # ID does not exist for Forge
loader: forge
- modpack: cyclops-id # ID does not exist for Fabric
loader: fabric
- modpack: cyclops-all-deps # No deps are relevant for Forge mods
loader: forge
- modpack: cyclops-all-deps # No deps are relevant for Fabric mods
loader: fabric
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v7
with:
submodules: true
- name: 'Setup Java'
uses: actions/setup-java@v6
with:
distribution: 'microsoft'
java-version: 25
- name: 'Load modpack from cache'
id: cache-mods
uses: actions/cache@v6
with:
path: run/mods
key: >-
mods-${{ matrix.modpack }}-${{ matrix.mc }}-${{ matrix.loader }}-${{
hashFiles(format('modpacks/{0}/{1}/{2}/pom.xml',
matrix.modpack,
matrix.mc,
matrix.loader))
}}
- name: 'Fetch modpack'
if: steps.cache-mods.outputs.cache-hit != 'true'
uses: nick-fields/retry@v4 # Retry, as some maven repos can be finicky
with:
timeout_minutes: 5
max_attempts: 3
command: ./fetch.sh modpacks/${{ matrix.modpack }}/${{ matrix.mc }}/${{ matrix.loader }}/pom.xml $(pwd)/run/mods
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Test in runtime client'
if: matrix.env == 'client' && (matrix.loader != 'forge' && matrix.loader != 'fabric') # This does not work yet on Forge or Fabric
timeout-minutes: 10
uses: headlesshq/mc-runtime-test@4.5.1
env:
CYCLOPSMC_ENABLEDGAMETESTSGLOBAL: true
with:
mc: ${{ matrix.mc }}
modloader: ${{ matrix.loader }}
regex: .*${{ matrix.loader }}.*
mc-runtime-test: ${{ matrix.loader == 'forge' && 'lexforge' || matrix.loader }}
java: ${{ env.java_version }}
headlessmc-command: --jvm "-Djava.awt.headless=true -DMcRuntimeGameTestMinExpectedGameTests=1"
fabric-api: ${{ matrix.fabric-api || 'none' }}
fabric-gametest-api: ${{ matrix.fabric-gametest-api || 'none' }}
- name: 'Test in runtime server'
if: matrix.env == 'server'
timeout-minutes: 10
uses: headlesshq/mc-server-test@1.1.1
env:
CYCLOPSMC_ENABLEDGAMETESTSGLOBAL: true
with:
java: ${{ env.java_version }}
mc: ${{ matrix.mc }}
modloader: ${{ matrix.loader }}
fabric-api: ${{ matrix.fabric-api || 'none' }}
fabric-gametest-api: ${{ matrix.fabric-gametest-api || 'none' }}
test-file: ${{ matrix.mc-server-test-file || './mc-server-test.json' }}
- uses: actions/upload-artifact@v7
if: matrix.env == 'client'
with:
name: ${{ matrix.modpack }}-${{ matrix.mc }}-${{ matrix.loader }}-mods
path: run/mods