mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Jeff's changes
This commit is contained in:
parent
6d9d0c5196
commit
2f56579bc1
32
.github/workflows/e2e-testing.yml
vendored
32
.github/workflows/e2e-testing.yml
vendored
@ -1,6 +1,12 @@
|
||||
name: End to End Testing
|
||||
|
||||
on: workflow_call
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
artifact-name:
|
||||
description: 'Slimefun artifact name'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
e2e-testing:
|
||||
@ -35,6 +41,11 @@ jobs:
|
||||
java-package: jdk
|
||||
architecture: x64
|
||||
|
||||
- name: Setup server
|
||||
run: |
|
||||
echo 'eula=true' > eula.txt
|
||||
mkdir plugins
|
||||
|
||||
- name: Download ${{ matrix.mcVersion }} Paper
|
||||
run: |
|
||||
VERSION="${{ matrix.mcVersion }}"
|
||||
@ -45,20 +56,17 @@ jobs:
|
||||
curl -o paper.jar \
|
||||
"https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds/$BUILD/downloads/$JAR_FILE"
|
||||
|
||||
- name: Download e2e-tester
|
||||
run: curl -o e2e-tester.jar https://preview-builds.walshy.dev/download/e2e-tester/main/latest
|
||||
|
||||
- name: Setup server
|
||||
run: |
|
||||
echo 'eula=true' > eula.txt
|
||||
mkdir plugins
|
||||
mv e2e-tester.jar plugins/e2e-tester.jar
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
- name: Download Slimefun
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: slimefun-${{ github.event.number }}
|
||||
name: ${{ inputs.artifact-name }}
|
||||
path: plugins/
|
||||
|
||||
- name: Download e2e-tester
|
||||
run: |
|
||||
curl -o e2e-tester.jar https://preview-builds.walshy.dev/download/e2e-tester/main/latest
|
||||
mv e2e-tester.jar plugins/e2e-tester.jar
|
||||
|
||||
- name: Run server
|
||||
run: |
|
||||
java -jar paper.jar --nogui
|
||||
|
12
.github/workflows/pull-request.yml
vendored
12
.github/workflows/pull-request.yml
vendored
@ -14,6 +14,8 @@ jobs:
|
||||
setup-preview-build:
|
||||
name: Preview build
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
short-commit-hash: ${{ steps.env-setup.outputs.SHORT_COMMIT_HASH }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@ -35,10 +37,12 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-m2
|
||||
|
||||
# Setup for the preview build
|
||||
- run: |
|
||||
- id: env-setup
|
||||
run: |
|
||||
SHORT_COMMIT_HASH=$(git rev-parse --short=8 ${{ github.sha }})
|
||||
JAR_VERSION="Preview Build #${{ github.event.number }}-$SHORT_COMMIT_HASH"
|
||||
echo "SHORT_COMMIT_HASH=$SHORT_COMMIT_HASH" >> "$GITHUB_ENV"
|
||||
echo "SHORT_COMMIT_HASH=$SHORT_COMMIT_HASH" >> "$GITHUB_OUTPUT"
|
||||
echo "JAR_VERSION=$JAR_VERSION" >> "$GITHUB_ENV"
|
||||
sed -i "s/<version>4.9-UNOFFICIAL<\/version>/<version>$JAR_VERSION<\/version>/g" pom.xml
|
||||
|
||||
@ -50,3 +54,9 @@ jobs:
|
||||
with:
|
||||
name: slimefun-${{ github.event.number }}-${{ env.SHORT_COMMIT_HASH }}
|
||||
path: 'target/Slimefun v${{ env.JAR_VERSION }}.jar'
|
||||
|
||||
call-workflows:
|
||||
needs: [setup-preview-build]
|
||||
uses: ./.github/workflows/e2e-testing.yml
|
||||
with:
|
||||
artifact-name: slimefun-${{ github.event.number }}-${{ needs.setup-preview-build.outputs.short-commit-hash }}
|
||||
|
Loading…
Reference in New Issue
Block a user