Skip to content

Commit

Permalink
Merge pull request #12 from Pikachu920/patch-1
Browse files Browse the repository at this point in the history
Add skript-test-action
  • Loading branch information
JakeGBLP authored Mar 16, 2024
2 parents 7579591 + b6ee0df commit 321aa0d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
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/
4 changes: 4 additions & 0 deletions src/test/scripts/conditions/CondCanBeEnchanted.sk
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"

0 comments on commit 321aa0d

Please sign in to comment.