From 101ddae4434e880c4ad0d401c9b35ca8afa92457 Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Tue, 28 Feb 2023 23:03:50 -0500 Subject: [PATCH 1/8] Create CODEOWNERS. --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..8ddb02e82 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @dumptruckman @benwoo1110 @nicegamer7 From d5ebde53b9b8dee278a7228079ee52ce022d1dcb Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Thu, 2 Mar 2023 12:32:07 +0800 Subject: [PATCH 2/8] Add maven central to repositories (#2859) Co-authored-by: Jeremy Wood --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index c4b2e7cac..5328d394f 100644 --- a/build.gradle +++ b/build.gradle @@ -15,6 +15,8 @@ java.sourceCompatibility = JavaVersion.VERSION_11 repositories { mavenLocal() + mavenCentral() + maven { url = uri('https://hub.spigotmc.org/nexus/content/repositories/snapshots/') } From 39287f55efbfa08db5f3e1114cc961d832cbd083 Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Wed, 1 Mar 2023 23:36:41 -0500 Subject: [PATCH 3/8] Delete CODEOWNERS. --- .github/CODEOWNERS | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 8ddb02e82..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @dumptruckman @benwoo1110 @nicegamer7 From e536dff1a88fd3fe98e6bf13965e1818d9f3353a Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Thu, 2 Mar 2023 00:37:30 -0500 Subject: [PATCH 4/8] Use a separate bukkit dependency for tests. --- build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 5328d394f..790907de8 100644 --- a/build.gradle +++ b/build.gradle @@ -43,7 +43,7 @@ repositories { } dependencies { - implementation('org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT') { + compileOnly('org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT') { exclude group: 'junit', module: 'junit' } @@ -66,6 +66,9 @@ dependencies { api 'de.themoep.idconverter:mappings:1.2-SNAPSHOT' api 'org.jetbrains:annotations:16.0.2' + testImplementation('org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT') { + exclude group: 'junit', module: 'junit' + } testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:3.11.2' testImplementation 'commons-io:commons-io:2.4' From 85d744d79f672731247903b382dfea376081417a Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Thu, 2 Mar 2023 00:44:32 -0500 Subject: [PATCH 5/8] Run tests against spigot-api 1.19.3. --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 790907de8..60ebea608 100644 --- a/build.gradle +++ b/build.gradle @@ -66,7 +66,8 @@ dependencies { api 'de.themoep.idconverter:mappings:1.2-SNAPSHOT' api 'org.jetbrains:annotations:16.0.2' - testImplementation('org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT') { + testImplementation 'org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT' + testImplementation('com.googlecode.json-simple:json-simple:1.1.1') { exclude group: 'junit', module: 'junit' } testImplementation 'junit:junit:4.12' From b6574245b8254468488765a105c6c5858fe6ae4e Mon Sep 17 00:00:00 2001 From: Jeremy Wood Date: Thu, 2 Mar 2023 00:48:54 -0500 Subject: [PATCH 6/8] Remove junit exclusion from compileOnly bukkit. --- build.gradle | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 60ebea608..9e0beda18 100644 --- a/build.gradle +++ b/build.gradle @@ -43,9 +43,7 @@ repositories { } dependencies { - compileOnly('org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT') { - exclude group: 'junit', module: 'junit' - } + compileOnly 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT' implementation('com.github.MilkBowl:VaultAPI:1.7') { exclude group: 'org.bukkit', module: 'bukkit' From 68c97f7ae6d1c634cc1f099f39f42cb2218e6ef7 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:21:36 +0800 Subject: [PATCH 7/8] build: Add artifacting of PR build --- .github/workflows/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe2e3b1d8..c5b552973 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,12 @@ jobs: distribution: 'adopt' cache: gradle + - name: Get PR number + id: pr + run: echo "::set-output name=pull_request_number::$(gh pr view --json number -q .number || echo "")" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 @@ -26,4 +32,14 @@ jobs: with: arguments: build env: + GITHUB_VERSION: pr${{ steps.pr.outputs.pull_request_number }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Staging artifact + run: mkdir staging && cp build/libs/*.jar staging + + - name: Artifact output + uses: actions/upload-artifact@v2 + with: + name: multiverse-core-pr${{ steps.pr.outputs.pull_request_number }} + path: staging From 3b44ea218dc84786addd0dc353e6ef587eeb5ed4 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Fri, 3 Mar 2023 23:28:55 +0800 Subject: [PATCH 8/8] build: Fix PR build number --- .github/workflows/test.yml | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5b552973..68d7ff4ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,12 +18,6 @@ jobs: distribution: 'adopt' cache: gradle - - name: Get PR number - id: pr - run: echo "::set-output name=pull_request_number::$(gh pr view --json number -q .number || echo "")" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 @@ -32,14 +26,11 @@ jobs: with: arguments: build env: - GITHUB_VERSION: pr${{ steps.pr.outputs.pull_request_number }} + GITHUB_VERSION: pr${{ github.event.pull_request.number }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Staging artifact - run: mkdir staging && cp build/libs/*.jar staging - - name: Artifact output - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: - name: multiverse-core-pr${{ steps.pr.outputs.pull_request_number }} - path: staging + name: multiverse-core-pr${{ github.event.pull_request.number }} + path: build/libs/multiverse-core-pr${{ github.event.pull_request.number }}.jar