Skip to content

adjust test framework and test-skripts workflow to make sure native l… #51

adjust test framework and test-skripts workflow to make sure native l…

adjust test framework and test-skripts workflow to make sure native l… #51

Workflow file for this run

name: Run tests
on:
workflow_dispatch:
push:
branches:
- stable
- dev
paths:
- tests/**
- scripts/**
- .github/workflows/test-skripts.yml
pull_request:
branches:
- stable
- dev
paths:
- tests/**
- scripts/**
- .github/workflows/test-skripts.yml
concurrency:
group: run-tests-${{ github.head_ref || github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Pre-create plugin directory
run: |
mkdir -p build/libs
mkdir -p build/libs/skript-reflect
- name: Download Skript-Reflect
run: |
mkdir -p build/libs
curl -L -o build/libs/skript-reflect.jar \
https://github.com/SkriptLang/skript-reflect/releases/download/v2.6.3/skript-reflect-2.6.3.jar
- name: Download Routines from JitPack
run: |
mkdir -p build/libs
curl -L --fail -o build/libs/skript-reflect/routines-core.jar \
https://jitpack.io/com/github/devdinc/routines/routines-core/v2.2.1/routines-core-v2.2.1.jar
curl -L --fail -o build/libs/skript-reflect/routines-paper.jar \
https://jitpack.io/com/github/devdinc/routines/routines-paper/v2.2.1/routines-paper-v2.2.1.jar
- name: Prepare scripts
run: |
mkdir -p tests/scripts
rsync -av scripts/ tests/scripts/
rm -f tests/scripts/utils/configreloadv2.sk
- name: Force-load Skript native test suite
run: |
cat > tests/zzzz_force_native_tests.sk <<'EOF'
import:
ch.njol.skript.test.runner.SkriptTestEvent
test "run devdinc tests":
event is instance of SkriptTestEvent
send "Running devdinc tests" to console
set {_list::string} to "f39f0f4a-31ee-4b71-87e9-38ddba3a2313"
set {_list::boolean} to false
call custom event "skriptTest" with {_list::*}
set {_tests::*} to all tests
autorun {_tests::*}
EOF
- name: Run tests
uses: devdinc/skript-test-action@v1.3
with:
skript_repo_url: https://github.com/SkriptLang/Skript.git
# directory where your test scripts are located (relative to repo root)
test_script_directory: tests
# Skript version or ref (tag, branch, or commit)
skript_repo_ref: dev/feature
# directory containing addon/plugin jars (relative to repo root)
extra_plugins_directory: build/libs
run_vanilla_tests: false