-
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (62 loc) · 1.68 KB
/
build-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Build and test with Scenamatica
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
permissions:
pull-requests: write
jobs:
build:
name: Build with Maven
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
id: sj
with:
java-version: 8
distribution: zulu
cache: maven
- uses: derongan/nmsaction@v1
if: "steps.sj.outputs.cache-hit != 'true'"
with:
rev: 1.16.5
- name: Install nms into m2
if: "steps.sj.outputs.cache-hit != 'true'"
run: |
mkdir -p $HOME/.m2/repository
cp -a nms-build/.m2/repository/. $HOME/.m2/repository
- name: Build with Maven
run: mvn -B package --file pom.xml -D"jar.finalName=Scenamatica" -P debug
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: scenamatica
path: ScenamaticaPlugin/target/Scenamatica.jar
retention-days: 1
if-no-files-found: error
test:
name: Self-test with Scenamatica
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: scenamatica
- name: Run Scenamatica tests
uses: teamkun/[email protected]
with:
plugin: Scenamatica.jar
env:
NO_SCENAMATICA: true # Because the test is running scenamatica itself, we don't need the daemon.
- name: Clean artifacts
if: always()
uses: geekyeggo/delete-artifact@v2
with:
name: scenamatica