-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Pikachu920/patch-1
Add skript-test-action
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build and test | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 17 | ||
distribution: 'adopt' | ||
- name: Install Gradle | ||
uses: sdkman/sdkman-action@main | ||
with: | ||
candidate: gradle | ||
version: 8.6 | ||
- name: Generate Gradle wrapper | ||
run: gradle wrapper | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew build | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Lusk.jar | ||
path: build/libs/*.jar | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
- 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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test "CondCanBeEnchanted": | ||
assert dirt can't be enchanted with sharpness with "dirt can't be enchanted with sharpness" | ||
assert diamond sword can be enchanted with sharpness with "a diamond sword can be enchanted with sharpness" | ||
|