https://github.com/skriptlang/skript-test-action
A GitHub Action to use the Skript testing system
https://github.com/skriptlang/skript-test-action
skript
Last synced: 9 months ago
JSON representation
A GitHub Action to use the Skript testing system
- Host: GitHub
- URL: https://github.com/skriptlang/skript-test-action
- Owner: SkriptLang
- License: mit
- Created: 2024-02-05T17:07:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-17T05:40:54.000Z (over 1 year ago)
- Last Synced: 2024-10-30T05:42:55.130Z (about 1 year ago)
- Topics: skript
- Language: Python
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# skript-test-action
skript-test-action is a GitHub Action that addon developers can use to utilize Skript's test suite within their addons!
In addition to testing your own syntaxes, you can also run the vanilla Skript tests alongside your own to ensure that
your addon does not change any vanilla behavior!
### How to use
Using the action involves two pieces:
1. Configure a [GitHub Action](https://docs.github.com/en/actions/learn-github-actions) for your repository that builds
your addon
2. Add skript-action-test as a step like so:
```yaml
- name: Run tests
uses: SkriptLang/skript-test-action@v1.0
with:
# the directory where your test scripts are located relative to the repo root
test_script_directory: src/test/scripts
# you can test against a specific skript version by specifying this tag
# you can also not define it to use the latest master branch commit
skript_repo_ref: 2.8.2
# this should be where your addon jar is located relative to the repo root
extra_plugins_directory: build/libs
```
A good minimal example of how to use skript-test-action can be found on the
[skript-reflect](https://github.com/SkriptLang/skript-reflect) repository. The action file is
[here](https://github.com/SkriptLang/skript-reflect/blob/2.x/.github/workflows/gradle.yml) and the test scripts
directory is [here](https://github.com/SkriptLang/skript-reflect/tree/2.x/src/test/scripts). There isn't
much documentation on how to write test scripts, but they are pretty simple. You can find plenty of examples on the
Skript repository [here](https://github.com/SkriptLang/Skript/tree/master/src/test/skript/tests).