Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/currency-…
Browse files Browse the repository at this point in the history
…research
  • Loading branch information
StarWishsama committed Nov 25, 2023
2 parents 9644364 + 0589b21 commit 9235128
Show file tree
Hide file tree
Showing 33 changed files with 509 additions and 83 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/discord-webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.6.0
uses: actions/checkout@v4.1.1

- name: Set up Java JDK 17
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: 'adopt'
java-version: '17'
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/e2e-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: End to End Testing

on:
workflow_call:
inputs:
artifact-name:
description: 'Slimefun artifact name'
required: true
type: string

jobs:
e2e-testing:
name: End to End Testing
runs-on: ubuntu-latest
timeout-minutes: 5

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'

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/[email protected]
with:
distribution: temurin
java-version: ${{ matrix.javaVersion }}
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 }}"
BUILD_JAR=$(curl -s "https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds" \
| jq '.builds[-1] | "\(.build) \(.downloads.application.name)"' -r)
BUILD=$(echo "$BUILD_JAR" | awk '{print $1}')
JAR_FILE=$(echo "$BUILD_JAR" | awk '{print $2}')
curl -o paper.jar \
"https://api.papermc.io/v2/projects/paper/versions/$VERSION/builds/$BUILD/downloads/$JAR_FILE"
- name: Download Slimefun
uses: actions/download-artifact@v3
with:
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
2 changes: 1 addition & 1 deletion .github/workflows/json-validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Validate wiki.json
uses: docker://orrosenblatt/validate-json-action:latest@sha256:02370758b8b199e0477da11ecfdd498c75c561685056b5c31b925a4ab95df7f4
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven-compiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: 'adopt'
java-version: '17'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
api: '🔧 API'
compatibility: '🤝 Compatibility'

- uses: thollander/[email protected].2
- uses: thollander/[email protected].3
name: Leave a comment about the applied label
if: ${{ steps.labeller.outputs.applied != 0 }}
with:
Expand All @@ -40,7 +40,7 @@ jobs:
Your Pull Request was automatically labelled as: "${{ steps.labeller.outputs.applied }}"
Thank you for contributing to this project! ❤️
- uses: thollander/[email protected].2
- uses: thollander/[email protected].3
name: Leave a comment about our branch naming convention
if: ${{ steps.labeller.outputs.applied == 0 }}
with:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ 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
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: 'adopt'
java-version: '17'
Expand All @@ -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
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/release-candidates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 'stable'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.6.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- name: Set up JDK 17
uses: actions/setup-java@v3.12.0
uses: actions/setup-java@v3.13.0
with:
distribution: 'adopt'
java-version: '17'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yaml-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: YAML Linter
uses: ibiqlik/[email protected]
with:
Expand Down
24 changes: 12 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
<!-- Plugin for Unit Tests -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.1</version>

<configuration>
<junitArtifactName>org.junit.jupiter:junit-jupiter</junitArtifactName>
Expand All @@ -158,14 +158,14 @@
<!-- Sonarcloud Scanner -->
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.1.2184</version>
<version>3.10.0.2594</version>
</plugin>

<plugin>
<!-- Code Coverage Reports -->
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<version>0.8.11</version>

<executions>
<execution>
Expand All @@ -191,7 +191,7 @@
<!-- Dependency shading -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<version>3.5.1</version>

<configuration>
<!-- Relocate these to avoid clashes and conflicts -->
Expand Down Expand Up @@ -239,7 +239,7 @@
<!-- Javadocs -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>

<configuration>
<reportOutputDirectory>${project.basedir}</reportOutputDirectory>
Expand Down Expand Up @@ -355,7 +355,7 @@
<dependency>
<groupId>com.github.baked-libs.dough</groupId>
<artifactId>dough-api</artifactId>
<version>d3b0997226</version>
<version>99381b2</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -389,7 +389,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.5.0</version>
<version>5.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -418,7 +418,7 @@
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-core</artifactId>
<version>7.2.15</version>
<version>7.2.17</version>
<scope>provided</scope>

<exclusions>
Expand All @@ -432,7 +432,7 @@
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.2.15</version>
<version>7.2.17</version>
<scope>provided</scope>

<exclusions>
Expand All @@ -446,7 +446,7 @@
<dependency>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.223</version>
<version>2.1.225</version>
<scope>provided</scope>

<exclusions>
Expand All @@ -460,7 +460,7 @@
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.3</version>
<version>2.11.5</version>
<scope>provided</scope>

<exclusions>
Expand Down Expand Up @@ -488,7 +488,7 @@
<dependency>
<groupId>com.github.LoneDev6</groupId>
<artifactId>itemsadder-api</artifactId>
<version>3.5.0b</version>
<version>3.6.1</version>
<scope>provided</scope>

<exclusions>
Expand Down
Loading

0 comments on commit 9235128

Please sign in to comment.