2023-11-21 19:47:19 +00:00
|
|
|
name: End to End Testings
|
2023-06-30 21:59:50 +00:00
|
|
|
|
2023-07-16 21:20:49 +00:00
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
artifact-name:
|
|
|
|
description: 'Slimefun artifact name'
|
|
|
|
required: true
|
|
|
|
type: string
|
2023-06-30 21:59:50 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
e2e-testing:
|
|
|
|
name: End to End Testing
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 5
|
|
|
|
|
2023-07-02 11:09:51 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- mcVersion: '1.16.5'
|
|
|
|
javaVersion: '16'
|
|
|
|
- mcVersion: '1.17.1'
|
|
|
|
javaVersion: '17'
|
|
|
|
- mcVersion: '1.18.2'
|
|
|
|
javaVersion: '18'
|
|
|
|
- mcVersion: '1.19.4'
|
|
|
|
javaVersion: '19'
|
|
|
|
- mcVersion: '1.20.1'
|
|
|
|
javaVersion: '20'
|
|
|
|
|
2023-06-30 21:59:50 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2023-11-20 20:20:00 +00:00
|
|
|
- name: Set up JDK
|
2023-06-30 21:59:50 +00:00
|
|
|
uses: actions/setup-java@v3.11.0
|
|
|
|
with:
|
2023-07-02 11:09:51 +00:00
|
|
|
distribution: temurin
|
|
|
|
java-version: ${{ matrix.javaVersion }}
|
2023-06-30 21:59:50 +00:00
|
|
|
java-package: jdk
|
|
|
|
architecture: x64
|
|
|
|
|
2023-07-16 21:20:49 +00:00
|
|
|
- name: Setup server
|
|
|
|
run: |
|
|
|
|
echo 'eula=true' > eula.txt
|
|
|
|
mkdir plugins
|
|
|
|
|
2023-07-02 11:09:51 +00:00
|
|
|
- name: Download ${{ matrix.mcVersion }} Paper
|
2023-06-30 21:59:50 +00:00
|
|
|
run: |
|
2023-07-02 11:09:51 +00:00
|
|
|
VERSION="${{ matrix.mcVersion }}"
|
|
|
|
BUILD_JAR=$(curl -s "https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds" \
|
|
|
|
| jq '.builds[-1] | "\(.build) \(.downloads.application.name)"' -r)
|
2023-06-30 21:59:50 +00:00
|
|
|
BUILD=$(echo "$BUILD_JAR" | awk '{print $1}')
|
|
|
|
JAR_FILE=$(echo "$BUILD_JAR" | awk '{print $2}')
|
2023-07-02 11:09:51 +00:00
|
|
|
curl -o paper.jar \
|
|
|
|
"https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds/$BUILD/downloads/$JAR_FILE"
|
2023-06-30 21:59:50 +00:00
|
|
|
|
2023-07-16 21:20:49 +00:00
|
|
|
- name: Download Slimefun
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ inputs.artifact-name }}
|
|
|
|
path: plugins/
|
2023-07-04 22:48:44 +00:00
|
|
|
|
2023-07-16 21:20:49 +00:00
|
|
|
- name: Download e2e-tester
|
2023-06-30 21:59:50 +00:00
|
|
|
run: |
|
2023-07-16 21:20:49 +00:00
|
|
|
curl -o e2e-tester.jar https://preview-builds.walshy.dev/download/e2e-tester/main/latest
|
2023-07-04 22:48:44 +00:00
|
|
|
mv e2e-tester.jar plugins/e2e-tester.jar
|
2023-06-30 21:59:50 +00:00
|
|
|
|
|
|
|
- name: Run server
|
|
|
|
run: |
|
|
|
|
java -jar paper.jar --nogui
|