-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (51 loc) · 1.24 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
46
47
48
49
50
51
52
on:
push:
branches: main
name: Test the server
jobs:
test:
env:
upload_to_mclogs: true
runs-on: ubuntu-latest
steps:
- name: Checkout bc23
uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache
id: cache
uses: actions/cache@v3
with:
key: mcman-build-${{ hashFiles('server.toml') }}
path: |
./server
~/.cache/mcman
restore-keys: |
mcman-build-${{ hashFiles('server.toml') }}
mcman-build-
mcman-
- name: Install mcman
run: |
wget https://github.com/ParadigmMC/mcman/releases/latest/download/mcman
sudo mv ./mcman /usr/bin/
sudo chmod +x /usr/bin/mcman
- name: Test the server
id: test
run: |
mcman run --test
- name: Archive log
uses: actions/upload-artifact@v3
with:
name: latest.log
path: |
server/logs/latest.log
- name: Archive crash reports
uses: actions/upload-artifact@v3
if: steps.test.outcome == 'failure'
with:
name: crash
path: |
server/crash-reports/*