Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and test

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: false
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build test
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: build/libs/oopsk*.jar
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "build/test-results/**/TEST-*.xml"
if: always()

skript_test:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: extra-plugins/
merge-multiple: true

- name: Run tests
uses: SkriptLang/[email protected]
with:
test_script_directory: src/test/scripts
skript_repo_ref: dev/patch
extra_plugins_directory: extra-plugins/
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ plugins {

group = 'com.sovdee'

test {
useJUnitPlatform()
}

repositories {
mavenCentral()
maven {
Expand All @@ -17,15 +21,14 @@ repositories {
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'

compileOnly 'org.spigotmc:spigot-api:1.21.4-R0.1-SNAPSHOT'
compileOnly "com.github.SkriptLang:Skript:2.10.2"
compileOnly "com.github.SkriptLang:Skript:2.11.0"
compileOnly 'org.jetbrains:annotations:26.0.1'
}

processResources {
filter ReplaceTokens, tokens: ["version": project.property("version")]
from("lang/") {
include '*.lang'
into 'lang/'
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = 1.0-alpha2
version = 1.0-beta1
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
8 changes: 7 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
251 changes: 251 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading